git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into for-linus
[safe/jmp/linux-2.6]
/
drivers
/
rtc
/
rtc-sa1100.c
diff --git
a/drivers/rtc/rtc-sa1100.c
b/drivers/rtc/rtc-sa1100.c
index
021b292
..
29f98a7
100644
(file)
--- 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)
}
#ifdef CONFIG_PM
}
#ifdef CONFIG_PM
-static int sa1100_rtc_suspend(struct
platform_device *pdev, pm_message_t state
)
+static int sa1100_rtc_suspend(struct
device *dev
)
{
{
- if (device_may_wakeup(
&pdev->
dev))
+ if (device_may_wakeup(dev))
enable_irq_wake(IRQ_RTCAlrm);
return 0;
}
enable_irq_wake(IRQ_RTCAlrm);
return 0;
}
-static int sa1100_rtc_resume(struct
platform_device *p
dev)
+static int sa1100_rtc_resume(struct
device *
dev)
{
{
- if (device_may_wakeup(
&pdev->
dev))
+ if (device_may_wakeup(dev))
disable_irq_wake(IRQ_RTCAlrm);
return 0;
}
disable_irq_wake(IRQ_RTCAlrm);
return 0;
}
-#else
-#define sa1100_rtc_suspend NULL
-#define sa1100_rtc_resume NULL
+
+static struct dev_pm_ops sa1100_rtc_pm_ops = {
+ .suspend = sa1100_rtc_suspend,
+ .resume = sa1100_rtc_resume,
+};
#endif
static struct platform_driver sa1100_rtc_driver = {
.probe = sa1100_rtc_probe,
.remove = sa1100_rtc_remove,
#endif
static struct platform_driver sa1100_rtc_driver = {
.probe = sa1100_rtc_probe,
.remove = sa1100_rtc_remove,
- .suspend = sa1100_rtc_suspend,
- .resume = sa1100_rtc_resume,
.driver = {
.driver = {
- .name = "sa1100-rtc",
+ .name = "sa1100-rtc",
+#ifdef CONFIG_PM
+ .pm = &sa1100_rtc_pm_ops,
+#endif
},
};
},
};