[patch 2.6.19-rc6 1/6] rtc class /proc/driver/rtc update

From: David Brownell
Date: Mon Nov 20 2006 - 17:17:32 EST


Fix two minor botches in the procfs dumping of RTC alarm status:

- Stop confusing "alarm enabled" with "wakeup enabled".

- Don't display bogus "irq pending/un-acked" status; those are the rather
pointless semantics EFI assigned to this (for a no-IRQs environment).

The main RTC that seems confused about this is the sa1100 one, which
doesn't actually report whether it enabled the alarm.

Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

Index: g26/drivers/rtc/rtc-proc.c
===================================================================
--- g26.orig/drivers/rtc/rtc-proc.c 2006-11-20 09:35:39.000000000 -0800
+++ g26/drivers/rtc/rtc-proc.c 2006-11-20 09:36:23.000000000 -0800
@@ -66,9 +66,11 @@ static int rtc_proc_show(struct seq_file
else
seq_printf(seq, "**\n");
seq_printf(seq, "alrm_wakeup\t: %s\n",
+ device_may_wakeup(class_dev->dev)
+ ? "yes" : "no");
+ seq_printf(seq, "alrm_enabled\t: %s\n",
alrm.enabled ? "yes" : "no");
- seq_printf(seq, "alrm_pending\t: %s\n",
- alrm.pending ? "yes" : "no");
+ /* alrm.pending ("irq un-acked") is useless ... */
}

seq_printf(seq, "24hr\t\t: yes\n");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/