From adfb4341259f2f89baac2316a8a3660b63c1103b Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 10 Apr 2006 22:54:43 -0700 Subject: [PATCH] RTC subsystem: fix proc output 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 Cc: Lennert Buytenhek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/rtc-test.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/rtc/rtc-test.c') diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index 43d10748782..1bfe212b64a 100644 --- a/drivers/rtc/rtc-test.c +++ b/drivers/rtc/rtc-test.c @@ -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); -- cgit v1.2.3-70-g09d2 From d1d65b7712016ca5ff2e44470eb13e772999de94 Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 10 Apr 2006 22:54:45 -0700 Subject: [PATCH] RTC subsystem: compact error messages Move registration error message from drivers to core. Signed-off-by: Alessandro Zummo Cc: Lennert Buytenhek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/class.c | 2 ++ drivers/rtc/rtc-ds1672.c | 2 -- drivers/rtc/rtc-ep93xx.c | 1 - drivers/rtc/rtc-m48t86.c | 4 +--- drivers/rtc/rtc-pcf8563.c | 2 -- drivers/rtc/rtc-rs5c372.c | 2 -- drivers/rtc/rtc-sa1100.c | 1 - drivers/rtc/rtc-test.c | 2 -- drivers/rtc/rtc-x1205.c | 2 -- 9 files changed, 3 insertions(+), 15 deletions(-) (limited to 'drivers/rtc/rtc-test.c') diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 8533936d50d..413c7d54ea1 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -96,6 +96,8 @@ exit_idr: idr_remove(&rtc_idr, id); exit: + dev_err(dev, "rtc core: unable to register %s, err = %d\n", + name, err); return ERR_PTR(err); } EXPORT_SYMBOL_GPL(rtc_device_register); diff --git a/drivers/rtc/rtc-ds1672.c b/drivers/rtc/rtc-ds1672.c index 56a33136738..9be81fd4737 100644 --- a/drivers/rtc/rtc-ds1672.c +++ b/drivers/rtc/rtc-ds1672.c @@ -229,8 +229,6 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind) if (IS_ERR(rtc)) { err = PTR_ERR(rtc); - dev_err(&client->dev, - "unable to register the class device\n"); goto exit_detach; } diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index 6d9fe2cca28..e1a1169e466 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c @@ -109,7 +109,6 @@ static int __devinit ep93xx_rtc_probe(struct platform_device *dev) &dev->dev, &ep93xx_rtc_ops, THIS_MODULE); if (IS_ERR(rtc)) { - dev_err(&dev->dev, "unable to register\n"); return PTR_ERR(rtc); } diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index 911b27fc848..f6e7ee04f3d 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c @@ -151,10 +151,8 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev) struct rtc_device *rtc = rtc_device_register("m48t86", &dev->dev, &m48t86_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) { - dev_err(&dev->dev, "unable to register\n"); + if (IS_ERR(rtc)) return PTR_ERR(rtc); - } platform_set_drvdata(dev, rtc); diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index 0a7fd0b4685..ba9a583b7b6 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c @@ -290,8 +290,6 @@ static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind) if (IS_ERR(rtc)) { err = PTR_ERR(rtc); - dev_err(&client->dev, - "unable to register the class device\n"); goto exit_detach; } diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index 5e5cc10c675..7553d797603 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -233,8 +233,6 @@ static int rs5c372_probe(struct i2c_adapter *adapter, int address, int kind) if (IS_ERR(rtc)) { err = PTR_ERR(rtc); - dev_err(&client->dev, - "unable to register the class device\n"); goto exit_detach; } diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index 83b2bb480a1..0bfa6d2076f 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c @@ -341,7 +341,6 @@ static int sa1100_rtc_probe(struct platform_device *pdev) THIS_MODULE); if (IS_ERR(rtc)) { - dev_err(&pdev->dev, "Unable to register the RTC device\n"); return PTR_ERR(rtc); } diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index 1bfe212b64a..e1f7e8e86da 100644 --- a/drivers/rtc/rtc-test.c +++ b/drivers/rtc/rtc-test.c @@ -119,8 +119,6 @@ static int test_probe(struct platform_device *plat_dev) &test_rtc_ops, THIS_MODULE); if (IS_ERR(rtc)) { err = PTR_ERR(rtc); - dev_err(&plat_dev->dev, - "unable to register the class device\n"); return err; } device_create_file(&plat_dev->dev, &dev_attr_irq); diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c index f3573ef7c3f..788b6d1f8f2 100644 --- a/drivers/rtc/rtc-x1205.c +++ b/drivers/rtc/rtc-x1205.c @@ -544,8 +544,6 @@ static int x1205_probe(struct i2c_adapter *adapter, int address, int kind) if (IS_ERR(rtc)) { err = PTR_ERR(rtc); - dev_err(&client->dev, - "unable to register the class device\n"); goto exit_detach; } -- cgit v1.2.3-70-g09d2