[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>
This commit is contained in:
Alessandro Zummo 2006-04-10 22:54:45 -07:00 committed by Linus Torvalds
parent 8289607249
commit d1d65b7712
9 changed files with 3 additions and 15 deletions

View File

@ -96,6 +96,8 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev,
idr_remove(&rtc_idr, id); idr_remove(&rtc_idr, id);
exit: exit:
dev_err(dev, "rtc core: unable to register %s, err = %d\n",
name, err);
return ERR_PTR(err); return ERR_PTR(err);
} }
EXPORT_SYMBOL_GPL(rtc_device_register); EXPORT_SYMBOL_GPL(rtc_device_register);

View File

@ -229,8 +229,6 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind)
if (IS_ERR(rtc)) { if (IS_ERR(rtc)) {
err = PTR_ERR(rtc); err = PTR_ERR(rtc);
dev_err(&client->dev,
"unable to register the class device\n");
goto exit_detach; goto exit_detach;
} }

View File

@ -109,7 +109,6 @@ static int __devinit ep93xx_rtc_probe(struct platform_device *dev)
&dev->dev, &ep93xx_rtc_ops, THIS_MODULE); &dev->dev, &ep93xx_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc)) { if (IS_ERR(rtc)) {
dev_err(&dev->dev, "unable to register\n");
return PTR_ERR(rtc); return PTR_ERR(rtc);
} }

View File

@ -151,10 +151,8 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev)
struct rtc_device *rtc = rtc_device_register("m48t86", struct rtc_device *rtc = rtc_device_register("m48t86",
&dev->dev, &m48t86_rtc_ops, THIS_MODULE); &dev->dev, &m48t86_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc)) { if (IS_ERR(rtc))
dev_err(&dev->dev, "unable to register\n");
return PTR_ERR(rtc); return PTR_ERR(rtc);
}
platform_set_drvdata(dev, rtc); platform_set_drvdata(dev, rtc);

View File

@ -290,8 +290,6 @@ static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind)
if (IS_ERR(rtc)) { if (IS_ERR(rtc)) {
err = PTR_ERR(rtc); err = PTR_ERR(rtc);
dev_err(&client->dev,
"unable to register the class device\n");
goto exit_detach; goto exit_detach;
} }

View File

@ -233,8 +233,6 @@ static int rs5c372_probe(struct i2c_adapter *adapter, int address, int kind)
if (IS_ERR(rtc)) { if (IS_ERR(rtc)) {
err = PTR_ERR(rtc); err = PTR_ERR(rtc);
dev_err(&client->dev,
"unable to register the class device\n");
goto exit_detach; goto exit_detach;
} }

View File

@ -341,7 +341,6 @@ static int sa1100_rtc_probe(struct platform_device *pdev)
THIS_MODULE); THIS_MODULE);
if (IS_ERR(rtc)) { if (IS_ERR(rtc)) {
dev_err(&pdev->dev, "Unable to register the RTC device\n");
return PTR_ERR(rtc); return PTR_ERR(rtc);
} }

View File

@ -119,8 +119,6 @@ static int test_probe(struct platform_device *plat_dev)
&test_rtc_ops, THIS_MODULE); &test_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc)) { if (IS_ERR(rtc)) {
err = PTR_ERR(rtc); err = PTR_ERR(rtc);
dev_err(&plat_dev->dev,
"unable to register the class device\n");
return err; return err;
} }
device_create_file(&plat_dev->dev, &dev_attr_irq); device_create_file(&plat_dev->dev, &dev_attr_irq);

View File

@ -544,8 +544,6 @@ static int x1205_probe(struct i2c_adapter *adapter, int address, int kind)
if (IS_ERR(rtc)) { if (IS_ERR(rtc)) {
err = PTR_ERR(rtc); err = PTR_ERR(rtc);
dev_err(&client->dev,
"unable to register the class device\n");
goto exit_detach; goto exit_detach;
} }