Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Alessandro Zummo and committed by
Linus Torvalds
d1d65b77 82896072

+3 -15
+2
drivers/rtc/class.c
··· 96 96 idr_remove(&rtc_idr, id); 97 97 98 98 exit: 99 + dev_err(dev, "rtc core: unable to register %s, err = %d\n", 100 + name, err); 99 101 return ERR_PTR(err); 100 102 } 101 103 EXPORT_SYMBOL_GPL(rtc_device_register);
-2
drivers/rtc/rtc-ds1672.c
··· 229 229 230 230 if (IS_ERR(rtc)) { 231 231 err = PTR_ERR(rtc); 232 - dev_err(&client->dev, 233 - "unable to register the class device\n"); 234 232 goto exit_detach; 235 233 } 236 234
-1
drivers/rtc/rtc-ep93xx.c
··· 109 109 &dev->dev, &ep93xx_rtc_ops, THIS_MODULE); 110 110 111 111 if (IS_ERR(rtc)) { 112 - dev_err(&dev->dev, "unable to register\n"); 113 112 return PTR_ERR(rtc); 114 113 } 115 114
+1 -3
drivers/rtc/rtc-m48t86.c
··· 151 151 struct rtc_device *rtc = rtc_device_register("m48t86", 152 152 &dev->dev, &m48t86_rtc_ops, THIS_MODULE); 153 153 154 - if (IS_ERR(rtc)) { 155 - dev_err(&dev->dev, "unable to register\n"); 154 + if (IS_ERR(rtc)) 156 155 return PTR_ERR(rtc); 157 - } 158 156 159 157 platform_set_drvdata(dev, rtc); 160 158
-2
drivers/rtc/rtc-pcf8563.c
··· 290 290 291 291 if (IS_ERR(rtc)) { 292 292 err = PTR_ERR(rtc); 293 - dev_err(&client->dev, 294 - "unable to register the class device\n"); 295 293 goto exit_detach; 296 294 } 297 295
-2
drivers/rtc/rtc-rs5c372.c
··· 233 233 234 234 if (IS_ERR(rtc)) { 235 235 err = PTR_ERR(rtc); 236 - dev_err(&client->dev, 237 - "unable to register the class device\n"); 238 236 goto exit_detach; 239 237 } 240 238
-1
drivers/rtc/rtc-sa1100.c
··· 341 341 THIS_MODULE); 342 342 343 343 if (IS_ERR(rtc)) { 344 - dev_err(&pdev->dev, "Unable to register the RTC device\n"); 345 344 return PTR_ERR(rtc); 346 345 } 347 346
-2
drivers/rtc/rtc-test.c
··· 119 119 &test_rtc_ops, THIS_MODULE); 120 120 if (IS_ERR(rtc)) { 121 121 err = PTR_ERR(rtc); 122 - dev_err(&plat_dev->dev, 123 - "unable to register the class device\n"); 124 122 return err; 125 123 } 126 124 device_create_file(&plat_dev->dev, &dev_attr_irq);
-2
drivers/rtc/rtc-x1205.c
··· 544 544 545 545 if (IS_ERR(rtc)) { 546 546 err = PTR_ERR(rtc); 547 - dev_err(&client->dev, 548 - "unable to register the class device\n"); 549 547 goto exit_detach; 550 548 } 551 549