All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alessandro Zummo <a.zummo@towertech.it>
To: linux-kernel@vger.kernel.org
Cc: akpm@zip.com.au, akpm@osdl.org,
	Lennert Buytenhek <buytenh@wantstofly.org>
Subject: [PATCH 05/10] RTC subsystem, fix proc output
Date: Fri, 31 Mar 2006 12:04:28 +0200	[thread overview]
Message-ID: <20060331100424.067229000@towertech.it> (raw)
In-Reply-To: 20060331100423.175139000@towertech.it

[-- Attachment #1: rtc-subsys-fix-proc-24hr.patch --]
[-- Type: text/plain, Size: 3690 bytes --]

 Moved 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>

---
 drivers/rtc/rtc-ep93xx.c  |    1 -
 drivers/rtc/rtc-m48t86.c  |    3 ---
 drivers/rtc/rtc-pcf8563.c |    7 -------
 drivers/rtc/rtc-proc.c    |    2 ++
 drivers/rtc/rtc-rs5c372.c |    5 ++---
 drivers/rtc/rtc-test.c    |    1 -
 drivers/rtc/rtc-x1205.c   |    2 --
 7 files changed, 4 insertions(+), 17 deletions(-)

--- linux-rtc.orig/drivers/rtc/rtc-ep93xx.c	2006-03-29 02:14:50.000000000 +0200
+++ linux-rtc/drivers/rtc/rtc-ep93xx.c	2006-03-29 02:40:12.000000000 +0200
@@ -67,7 +67,6 @@ static int ep93xx_rtc_proc(struct device
 
 	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);
 
--- linux-rtc.orig/drivers/rtc/rtc-pcf8563.c	2006-03-29 02:14:50.000000000 +0200
+++ linux-rtc/drivers/rtc/rtc-pcf8563.c	2006-03-29 02:40:27.000000000 +0200
@@ -227,14 +227,7 @@ static int pcf8563_rtc_set_time(struct d
 	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,
 };
--- linux-rtc.orig/drivers/rtc/rtc-proc.c	2006-03-29 02:14:50.000000000 +0200
+++ linux-rtc/drivers/rtc/rtc-proc.c	2006-03-29 02:39:56.000000000 +0200
@@ -71,6 +71,8 @@ static int rtc_proc_show(struct seq_file
 				alrm.pending ? "yes" : "no");
 	}
 
+	seq_printf(seq, "24hr\t\t: yes\n");
+
 	if (ops->proc)
 		ops->proc(class_dev->dev, seq);
 
--- linux-rtc.orig/drivers/rtc/rtc-rs5c372.c	2006-03-29 02:14:50.000000000 +0200
+++ linux-rtc/drivers/rtc/rtc-rs5c372.c	2006-03-29 02:46:57.000000000 +0200
@@ -151,9 +151,8 @@ static int rs5c372_rtc_proc(struct devic
 {
 	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);
 	}
--- linux-rtc.orig/drivers/rtc/rtc-x1205.c	2006-03-29 02:38:39.000000000 +0200
+++ linux-rtc/drivers/rtc/rtc-x1205.c	2006-03-29 02:39:46.000000000 +0200
@@ -451,8 +451,6 @@ static int x1205_rtc_proc(struct device 
 {
 	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);
 
--- linux-rtc.orig/drivers/rtc/rtc-m48t86.c	2006-03-29 02:14:50.000000000 +0200
+++ linux-rtc/drivers/rtc/rtc-m48t86.c	2006-03-29 02:42:37.000000000 +0200
@@ -127,9 +127,6 @@ static int m48t86_rtc_proc(struct device
 
 	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");
 
--- linux-rtc.orig/drivers/rtc/rtc-test.c	2006-03-29 02:14:50.000000000 +0200
+++ linux-rtc/drivers/rtc/rtc-test.c	2006-03-29 02:42:54.000000000 +0200
@@ -49,7 +49,6 @@ static int test_rtc_proc(struct device *
 {
 	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);
 

--

  parent reply	other threads:[~2006-03-31 10:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-31 10:04 [PATCH 00/10] RTC subsystem Alessandro Zummo
2006-03-31 10:04 ` [PATCH 01/10] RTC subsystem, DS1672 oscillator handling Alessandro Zummo
2006-03-31 10:04 ` [PATCH 02/10] RTC subsystem, DS1672 cleanup Alessandro Zummo
2006-03-31 10:04 ` [PATCH 03/10] RTC subsystem, X1205 sysfs cleanup Alessandro Zummo
2006-03-31 10:04 ` [PATCH 04/10] RTC subsystem, whitespaces and error messages cleanup Alessandro Zummo
2006-03-31 10:04 ` Alessandro Zummo [this message]
2006-03-31 10:04 ` [PATCH 06/10] RTC subsystem, RS5C372 sysfs fix Alessandro Zummo
2006-03-31 10:04 ` [PATCH 07/10] RTC subsystem, compact error messages Alessandro Zummo
2006-03-31 10:04 ` [PATCH 08/10] RTC subsystem, SA1100 cleanup Alessandro Zummo
2006-04-02 18:43   ` Pavel Machek
2006-03-31 10:04 ` [PATCH 09/10] RTC subsystem, VR41XX driver Alessandro Zummo
2006-04-01 23:20   ` Andrew Morton
2006-03-31 10:04 ` [PATCH 10/10] RTC subsystem, VR41XX cleanup Alessandro Zummo
     [not found] ` <Pine.LNX.4.63.0605030826290.1846@pcgl.dsa-ac.de>
     [not found]   ` <20060503105816.65f309f8@inspiron>
     [not found]     ` <Pine.LNX.4.63.0605031120570.1846@pcgl.dsa-ac.de>
     [not found]       ` <20060503121354.61bf3558@inspiron>
     [not found]         ` <Pine.LNX.4.63.0605031223350.1846@pcgl.dsa-ac.de>
     [not found]           ` <20060503122555.5337523f@inspiron>
     [not found]             ` <Pine.LNX.4.63.0605031242020.1846@pcgl.dsa-ac.de>
     [not found]               ` <20060503132301.52a75dcd@inspiron>
2006-05-05 18:43                 ` drivers/acorn/char/pcf8583.[hc] vs. RTC subsystem Guennadi Liakhovetski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060331100424.067229000@towertech.it \
    --to=a.zummo@towertech.it \
    --cc=akpm@osdl.org \
    --cc=akpm@zip.com.au \
    --cc=buytenh@wantstofly.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.