]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] RTC subsystem: fix proc output
authorAlessandro Zummo <a.zummo@towertech.it>
Tue, 11 Apr 2006 05:54:43 +0000 (22:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:47 +0000 (06:18 -0700)
Move the "24hr: yes" proc output from drivers to rtc proc code.  This is
required because the time value in the proc output is always in 24hr mode
regardless of the driver.

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/rtc/rtc-ep93xx.c
drivers/rtc/rtc-m48t86.c
drivers/rtc/rtc-pcf8563.c
drivers/rtc/rtc-proc.c
drivers/rtc/rtc-rs5c372.c
drivers/rtc/rtc-test.c
drivers/rtc/rtc-x1205.c

index 0dd80ea686a9b62320014589424b1e1ca8fbff9d..6d9fe2cca28594160af6d5ce8073e449bb78d3be 100644 (file)
@@ -67,7 +67,6 @@ static int ep93xx_rtc_proc(struct device *dev, struct seq_file *seq)
 
        ep93xx_get_swcomp(dev, &preload, &delete);
 
-       seq_printf(seq, "24hr\t\t: yes\n");
        seq_printf(seq, "preload\t\t: %d\n", preload);
        seq_printf(seq, "delete\t\t: %d\n", delete);
 
index 1fadada42a47a3bf362f042df21587289bfffa94..911b27fc8488b48c21a9132cf8c96473820c265c 100644 (file)
@@ -127,9 +127,6 @@ static int m48t86_rtc_proc(struct device *dev, struct seq_file *seq)
 
        reg = ops->readb(M48T86_REG_B);
 
-       seq_printf(seq, "24hr\t\t: %s\n",
-                (reg & M48T86_REG_B_H24) ? "yes" : "no");
-
        seq_printf(seq, "mode\t\t: %s\n",
                 (reg & M48T86_REG_B_DM) ? "binary" : "bcd");
 
index 26feca7caf07efb92a560ade155cc4d1c5e79827..0a7fd0b4685a5e04b36b9ca833d7930352e2a501 100644 (file)
@@ -227,14 +227,7 @@ static int pcf8563_rtc_set_time(struct device *dev, struct rtc_time *tm)
        return pcf8563_set_datetime(to_i2c_client(dev), tm);
 }
 
-static int pcf8563_rtc_proc(struct device *dev, struct seq_file *seq)
-{
-       seq_printf(seq, "24hr\t\t: yes\n");
-       return 0;
-}
-
 static struct rtc_class_ops pcf8563_rtc_ops = {
-       .proc           = pcf8563_rtc_proc,
        .read_time      = pcf8563_rtc_read_time,
        .set_time       = pcf8563_rtc_set_time,
 };
index 90b8a97a091988801823e41124ddbb60ba4f24cf..cef5f5a3bbf9298233e25a2da7ba9dcc464133b2 100644 (file)
@@ -71,6 +71,8 @@ static int rtc_proc_show(struct seq_file *seq, void *offset)
                                alrm.pending ? "yes" : "no");
        }
 
+       seq_printf(seq, "24hr\t\t: yes\n");
+
        if (ops->proc)
                ops->proc(class_dev->dev, seq);
 
index b0aeb96aa5c76f1696863b065b8baae9ae1b591e..48aecb8902723f503a5f87dd591a06357b0b94c8 100644 (file)
@@ -151,9 +151,8 @@ static int rs5c372_rtc_proc(struct device *dev, struct seq_file *seq)
 {
        int err, osc, trim;
 
-       seq_printf(seq, "24hr\t\t: yes\n");
-
-       if ((err = rs5c372_get_trim(to_i2c_client(dev), &osc, &trim)) == 0) {
+       err = rs5c372_get_trim(to_i2c_client(dev), &osc, &trim);
+       if (err == 0) {
                seq_printf(seq, "%d.%03d KHz\n", osc / 1000, osc % 1000);
                seq_printf(seq, "trim\t: %d\n", trim);
        }
index 43d107487820aea0adaff9aae941881bc7d093f9..1bfe212b64a7398f27c13f384c722494f82a0e78 100644 (file)
@@ -49,7 +49,6 @@ static int test_rtc_proc(struct device *dev, struct seq_file *seq)
 {
        struct platform_device *plat_dev = to_platform_device(dev);
 
-       seq_printf(seq, "24hr\t\t: yes\n");
        seq_printf(seq, "test\t\t: yes\n");
        seq_printf(seq, "id\t\t: %d\n", plat_dev->id);
 
index cdf0eba993be646e69b8b15a442dc32ccb484a62..f3573ef7c3f591b609bd189c957825ab7bdff292 100644 (file)
@@ -451,8 +451,6 @@ static int x1205_rtc_proc(struct device *dev, struct seq_file *seq)
 {
        int err, dtrim, atrim;
 
-       seq_printf(seq, "24hr\t\t: yes\n");
-
        if ((err = x1205_get_dtrim(to_i2c_client(dev), &dtrim)) == 0)
                seq_printf(seq, "digital_trim\t: %d ppm\n", dtrim);