diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-ab3100.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-ds3232.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-s3c.c | 13 |
3 files changed, 10 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c index d26780ea254b..261a07e0fb24 100644 --- a/drivers/rtc/rtc-ab3100.c +++ b/drivers/rtc/rtc-ab3100.c | |||
@@ -235,6 +235,7 @@ static int __init ab3100_rtc_probe(struct platform_device *pdev) | |||
235 | err = PTR_ERR(rtc); | 235 | err = PTR_ERR(rtc); |
236 | return err; | 236 | return err; |
237 | } | 237 | } |
238 | platform_set_drvdata(pdev, rtc); | ||
238 | 239 | ||
239 | return 0; | 240 | return 0; |
240 | } | 241 | } |
@@ -244,6 +245,7 @@ static int __exit ab3100_rtc_remove(struct platform_device *pdev) | |||
244 | struct rtc_device *rtc = platform_get_drvdata(pdev); | 245 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
245 | 246 | ||
246 | rtc_device_unregister(rtc); | 247 | rtc_device_unregister(rtc); |
248 | platform_set_drvdata(pdev, NULL); | ||
247 | return 0; | 249 | return 0; |
248 | } | 250 | } |
249 | 251 | ||
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 9daed8db83d3..9de8516e3531 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c | |||
@@ -268,7 +268,6 @@ out_irq: | |||
268 | free_irq(client->irq, client); | 268 | free_irq(client->irq, client); |
269 | 269 | ||
270 | out_free: | 270 | out_free: |
271 | i2c_set_clientdata(client, NULL); | ||
272 | kfree(ds3232); | 271 | kfree(ds3232); |
273 | return ret; | 272 | return ret; |
274 | } | 273 | } |
@@ -287,7 +286,6 @@ static int __devexit ds3232_remove(struct i2c_client *client) | |||
287 | } | 286 | } |
288 | 287 | ||
289 | rtc_device_unregister(ds3232->rtc); | 288 | rtc_device_unregister(ds3232->rtc); |
290 | i2c_set_clientdata(client, NULL); | ||
291 | kfree(ds3232); | 289 | kfree(ds3232); |
292 | return 0; | 290 | return 0; |
293 | } | 291 | } |
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index a0d3ec89d412..f57a87f4ae96 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
@@ -310,11 +310,6 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
310 | 310 | ||
311 | s3c_rtc_setaie(alrm->enabled); | 311 | s3c_rtc_setaie(alrm->enabled); |
312 | 312 | ||
313 | if (alrm->enabled) | ||
314 | enable_irq_wake(s3c_rtc_alarmno); | ||
315 | else | ||
316 | disable_irq_wake(s3c_rtc_alarmno); | ||
317 | |||
318 | return 0; | 313 | return 0; |
319 | } | 314 | } |
320 | 315 | ||
@@ -587,6 +582,10 @@ static int s3c_rtc_suspend(struct platform_device *pdev, pm_message_t state) | |||
587 | ticnt_en_save &= S3C64XX_RTCCON_TICEN; | 582 | ticnt_en_save &= S3C64XX_RTCCON_TICEN; |
588 | } | 583 | } |
589 | s3c_rtc_enable(pdev, 0); | 584 | s3c_rtc_enable(pdev, 0); |
585 | |||
586 | if (device_may_wakeup(&pdev->dev)) | ||
587 | enable_irq_wake(s3c_rtc_alarmno); | ||
588 | |||
590 | return 0; | 589 | return 0; |
591 | } | 590 | } |
592 | 591 | ||
@@ -600,6 +599,10 @@ static int s3c_rtc_resume(struct platform_device *pdev) | |||
600 | tmp = readb(s3c_rtc_base + S3C2410_RTCCON); | 599 | tmp = readb(s3c_rtc_base + S3C2410_RTCCON); |
601 | writeb(tmp | ticnt_en_save, s3c_rtc_base + S3C2410_RTCCON); | 600 | writeb(tmp | ticnt_en_save, s3c_rtc_base + S3C2410_RTCCON); |
602 | } | 601 | } |
602 | |||
603 | if (device_may_wakeup(&pdev->dev)) | ||
604 | disable_irq_wake(s3c_rtc_alarmno); | ||
605 | |||
603 | return 0; | 606 | return 0; |
604 | } | 607 | } |
605 | #else | 608 | #else |