Skip to content

Commit d1d65b7

Browse files
Alessandro ZummoLinus Torvalds
authored andcommitted
[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>
1 parent 8289607 commit d1d65b7

9 files changed

Lines changed: 3 additions & 15 deletions

File tree

‎drivers/rtc/class.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev,
9696
idr_remove(&rtc_idr, id);
9797

9898
exit:
99+
dev_err(dev, "rtc core: unable to register %s, err = %d\n",
100+
name, err);
99101
return ERR_PTR(err);
100102
}
101103
EXPORT_SYMBOL_GPL(rtc_device_register);

‎drivers/rtc/rtc-ds1672.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind)
229229

230230
if (IS_ERR(rtc)) {
231231
err = PTR_ERR(rtc);
232-
dev_err(&client->dev,
233-
"unable to register the class device\n");
234232
goto exit_detach;
235233
}
236234

‎drivers/rtc/rtc-ep93xx.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ static int __devinit ep93xx_rtc_probe(struct platform_device *dev)
109109
&dev->dev, &ep93xx_rtc_ops, THIS_MODULE);
110110

111111
if (IS_ERR(rtc)) {
112-
dev_err(&dev->dev, "unable to register\n");
113112
return PTR_ERR(rtc);
114113
}
115114

‎drivers/rtc/rtc-m48t86.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,8 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev)
151151
struct rtc_device *rtc = rtc_device_register("m48t86",
152152
&dev->dev, &m48t86_rtc_ops, THIS_MODULE);
153153

154-
if (IS_ERR(rtc)) {
155-
dev_err(&dev->dev, "unable to register\n");
154+
if (IS_ERR(rtc))
156155
return PTR_ERR(rtc);
157-
}
158156

159157
platform_set_drvdata(dev, rtc);
160158

‎drivers/rtc/rtc-pcf8563.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,6 @@ static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind)
290290

291291
if (IS_ERR(rtc)) {
292292
err = PTR_ERR(rtc);
293-
dev_err(&client->dev,
294-
"unable to register the class device\n");
295293
goto exit_detach;
296294
}
297295

‎drivers/rtc/rtc-rs5c372.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ static int rs5c372_probe(struct i2c_adapter *adapter, int address, int kind)
233233

234234
if (IS_ERR(rtc)) {
235235
err = PTR_ERR(rtc);
236-
dev_err(&client->dev,
237-
"unable to register the class device\n");
238236
goto exit_detach;
239237
}
240238

‎drivers/rtc/rtc-sa1100.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ static int sa1100_rtc_probe(struct platform_device *pdev)
341341
THIS_MODULE);
342342

343343
if (IS_ERR(rtc)) {
344-
dev_err(&pdev->dev, "Unable to register the RTC device\n");
345344
return PTR_ERR(rtc);
346345
}
347346

‎drivers/rtc/rtc-test.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ static int test_probe(struct platform_device *plat_dev)
119119
&test_rtc_ops, THIS_MODULE);
120120
if (IS_ERR(rtc)) {
121121
err = PTR_ERR(rtc);
122-
dev_err(&plat_dev->dev,
123-
"unable to register the class device\n");
124122
return err;
125123
}
126124
device_create_file(&plat_dev->dev, &dev_attr_irq);

‎drivers/rtc/rtc-x1205.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,6 @@ static int x1205_probe(struct i2c_adapter *adapter, int address, int kind)
544544

545545
if (IS_ERR(rtc)) {
546546
err = PTR_ERR(rtc);
547-
dev_err(&client->dev,
548-
"unable to register the class device\n");
549547
goto exit_detach;
550548
}
551549

0 commit comments

Comments
 (0)