diff options
-rw-r--r-- | drivers/rtc/rtc-sa1100.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index 4f247e4dd3f9..dbd07c31042a 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c | |||
@@ -393,31 +393,34 @@ static int sa1100_rtc_remove(struct platform_device *pdev) | |||
393 | } | 393 | } |
394 | 394 | ||
395 | #ifdef CONFIG_PM | 395 | #ifdef CONFIG_PM |
396 | static int sa1100_rtc_suspend(struct platform_device *pdev, pm_message_t state) | 396 | static int sa1100_rtc_suspend(struct device *dev) |
397 | { | 397 | { |
398 | if (device_may_wakeup(&pdev->dev)) | 398 | if (device_may_wakeup(dev)) |
399 | enable_irq_wake(IRQ_RTCAlrm); | 399 | enable_irq_wake(IRQ_RTCAlrm); |
400 | return 0; | 400 | return 0; |
401 | } | 401 | } |
402 | 402 | ||
403 | static int sa1100_rtc_resume(struct platform_device *pdev) | 403 | static int sa1100_rtc_resume(struct device *dev) |
404 | { | 404 | { |
405 | if (device_may_wakeup(&pdev->dev)) | 405 | if (device_may_wakeup(dev)) |
406 | disable_irq_wake(IRQ_RTCAlrm); | 406 | disable_irq_wake(IRQ_RTCAlrm); |
407 | return 0; | 407 | return 0; |
408 | } | 408 | } |
409 | #else | 409 | |
410 | #define sa1100_rtc_suspend NULL | 410 | static struct dev_pm_ops sa1100_rtc_pm_ops = { |
411 | #define sa1100_rtc_resume NULL | 411 | .suspend = sa1100_rtc_suspend, |
412 | .resume = sa1100_rtc_resume, | ||
413 | }; | ||
412 | #endif | 414 | #endif |
413 | 415 | ||
414 | static struct platform_driver sa1100_rtc_driver = { | 416 | static struct platform_driver sa1100_rtc_driver = { |
415 | .probe = sa1100_rtc_probe, | 417 | .probe = sa1100_rtc_probe, |
416 | .remove = sa1100_rtc_remove, | 418 | .remove = sa1100_rtc_remove, |
417 | .suspend = sa1100_rtc_suspend, | ||
418 | .resume = sa1100_rtc_resume, | ||
419 | .driver = { | 419 | .driver = { |
420 | .name = "sa1100-rtc", | 420 | .name = "sa1100-rtc", |
421 | #ifdef CONFIG_PM | ||
422 | .pm = &sa1100_rtc_pm_ops, | ||
423 | #endif | ||
421 | }, | 424 | }, |
422 | }; | 425 | }; |
423 | 426 | ||