aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Zummo <a.zummo@towertech.it>2006-04-11 01:54:45 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 09:18:47 -0400
commitd1d65b7712016ca5ff2e44470eb13e772999de94 (patch)
tree06f6e823cf5ca785f055b129c003c55b9cbdae86
parent8289607249ad25ecfc9a3742873fcd8f319d5b09 (diff)
[PATCH] RTC subsystem: compact error messages
Move registration error message from drivers to core. 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>
-rw-r--r--drivers/rtc/class.c2
-rw-r--r--drivers/rtc/rtc-ds1672.c2
-rw-r--r--drivers/rtc/rtc-ep93xx.c1
-rw-r--r--drivers/rtc/rtc-m48t86.c4
-rw-r--r--drivers/rtc/rtc-pcf8563.c2
-rw-r--r--drivers/rtc/rtc-rs5c372.c2
-rw-r--r--drivers/rtc/rtc-sa1100.c1
-rw-r--r--drivers/rtc/rtc-test.c2
-rw-r--r--drivers/rtc/rtc-x1205.c2
9 files changed, 3 insertions, 15 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 8533936d50d8..413c7d54ea10 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -96,6 +96,8 @@ exit_idr:
96 idr_remove(&rtc_idr, id); 96 idr_remove(&rtc_idr, id);
97 97
98exit: 98exit:
99 dev_err(dev, "rtc core: unable to register %s, err = %d\n",
100 name, err);
99 return ERR_PTR(err); 101 return ERR_PTR(err);
100} 102}
101EXPORT_SYMBOL_GPL(rtc_device_register); 103EXPORT_SYMBOL_GPL(rtc_device_register);
diff --git a/drivers/rtc/rtc-ds1672.c b/drivers/rtc/rtc-ds1672.c
index 56a331367386..9be81fd4737c 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)
229 229
230 if (IS_ERR(rtc)) { 230 if (IS_ERR(rtc)) {
231 err = PTR_ERR(rtc); 231 err = PTR_ERR(rtc);
232 dev_err(&client->dev,
233 "unable to register the class device\n");
234 goto exit_detach; 232 goto exit_detach;
235 } 233 }
236 234
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 6d9fe2cca285..e1a1169e4664 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)
109 &dev->dev, &ep93xx_rtc_ops, THIS_MODULE); 109 &dev->dev, &ep93xx_rtc_ops, THIS_MODULE);
110 110
111 if (IS_ERR(rtc)) { 111 if (IS_ERR(rtc)) {
112 dev_err(&dev->dev, "unable to register\n");
113 return PTR_ERR(rtc); 112 return PTR_ERR(rtc);
114 } 113 }
115 114
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index 911b27fc8488..f6e7ee04f3dc 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)
151 struct rtc_device *rtc = rtc_device_register("m48t86", 151 struct rtc_device *rtc = rtc_device_register("m48t86",
152 &dev->dev, &m48t86_rtc_ops, THIS_MODULE); 152 &dev->dev, &m48t86_rtc_ops, THIS_MODULE);
153 153
154 if (IS_ERR(rtc)) { 154 if (IS_ERR(rtc))
155 dev_err(&dev->dev, "unable to register\n");
156 return PTR_ERR(rtc); 155 return PTR_ERR(rtc);
157 }
158 156
159 platform_set_drvdata(dev, rtc); 157 platform_set_drvdata(dev, rtc);
160 158
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 0a7fd0b4685a..ba9a583b7b68 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)
290 290
291 if (IS_ERR(rtc)) { 291 if (IS_ERR(rtc)) {
292 err = PTR_ERR(rtc); 292 err = PTR_ERR(rtc);
293 dev_err(&client->dev,
294 "unable to register the class device\n");
295 goto exit_detach; 293 goto exit_detach;
296 } 294 }
297 295
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c
index 5e5cc10c675e..7553d797603f 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)
233 233
234 if (IS_ERR(rtc)) { 234 if (IS_ERR(rtc)) {
235 err = PTR_ERR(rtc); 235 err = PTR_ERR(rtc);
236 dev_err(&client->dev,
237 "unable to register the class device\n");
238 goto exit_detach; 236 goto exit_detach;
239 } 237 }
240 238
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index 83b2bb480a16..0bfa6d2076f3 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)
341 THIS_MODULE); 341 THIS_MODULE);
342 342
343 if (IS_ERR(rtc)) { 343 if (IS_ERR(rtc)) {
344 dev_err(&pdev->dev, "Unable to register the RTC device\n");
345 return PTR_ERR(rtc); 344 return PTR_ERR(rtc);
346 } 345 }
347 346
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 1bfe212b64a7..e1f7e8e86daf 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)
119 &test_rtc_ops, THIS_MODULE); 119 &test_rtc_ops, THIS_MODULE);
120 if (IS_ERR(rtc)) { 120 if (IS_ERR(rtc)) {
121 err = PTR_ERR(rtc); 121 err = PTR_ERR(rtc);
122 dev_err(&plat_dev->dev,
123 "unable to register the class device\n");
124 return err; 122 return err;
125 } 123 }
126 device_create_file(&plat_dev->dev, &dev_attr_irq); 124 device_create_file(&plat_dev->dev, &dev_attr_irq);
diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c
index f3573ef7c3f5..788b6d1f8f2f 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)
544 544
545 if (IS_ERR(rtc)) { 545 if (IS_ERR(rtc)) {
546 err = PTR_ERR(rtc); 546 err = PTR_ERR(rtc);
547 dev_err(&client->dev,
548 "unable to register the class device\n");
549 goto exit_detach; 547 goto exit_detach;
550 } 548 }
551 549