aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds2404.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-ds2404.c')
-rw-r--r--drivers/rtc/rtc-ds2404.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/rtc/rtc-ds2404.c b/drivers/rtc/rtc-ds2404.c
index 5ea9df7c8c31..b04fc4272fb3 100644
--- a/drivers/rtc/rtc-ds2404.c
+++ b/drivers/rtc/rtc-ds2404.c
@@ -70,7 +70,7 @@ static int ds2404_gpio_map(struct ds2404 *chip, struct platform_device *pdev,
70 for (i = 0; i < ARRAY_SIZE(ds2404_gpio); i++) { 70 for (i = 0; i < ARRAY_SIZE(ds2404_gpio); i++) {
71 err = gpio_request(ds2404_gpio[i].gpio, ds2404_gpio[i].name); 71 err = gpio_request(ds2404_gpio[i].gpio, ds2404_gpio[i].name);
72 if (err) { 72 if (err) {
73 printk(KERN_ERR "error mapping gpio %s: %d\n", 73 dev_err(&pdev->dev, "error mapping gpio %s: %d\n",
74 ds2404_gpio[i].name, err); 74 ds2404_gpio[i].name, err);
75 goto err_request; 75 goto err_request;
76 } 76 }
@@ -177,7 +177,7 @@ static void ds2404_write_memory(struct device *dev, u16 offset,
177 177
178 for (i = 0; i < length; i++) { 178 for (i = 0; i < length; i++) {
179 if (out[i] != ds2404_read_byte(dev)) { 179 if (out[i] != ds2404_read_byte(dev)) {
180 printk(KERN_ERR "read invalid data\n"); 180 dev_err(dev, "read invalid data\n");
181 return; 181 return;
182 } 182 }
183 } 183 }
@@ -283,19 +283,7 @@ static struct platform_driver rtc_device_driver = {
283 .owner = THIS_MODULE, 283 .owner = THIS_MODULE,
284 }, 284 },
285}; 285};
286 286module_platform_driver(rtc_device_driver);
287static __init int ds2404_init(void)
288{
289 return platform_driver_register(&rtc_device_driver);
290}
291
292static __exit void ds2404_exit(void)
293{
294 platform_driver_unregister(&rtc_device_driver);
295}
296
297module_init(ds2404_init);
298module_exit(ds2404_exit);
299 287
300MODULE_DESCRIPTION("DS2404 RTC"); 288MODULE_DESCRIPTION("DS2404 RTC");
301MODULE_AUTHOR("Sven Schnelle"); 289MODULE_AUTHOR("Sven Schnelle");