aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2013-02-21 19:44:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 20:22:28 -0500
commit176a9f20d29de594c07faaeb10fecff664c956c6 (patch)
treefe17b14876de6c85b2ad9cbc8230fb2be179c3d0 /drivers/rtc
parentdfaf09ac8555141b7311bb69b456bd96886fd90c (diff)
drivers/rtc/rtc-tps65910.c: use sleep_pm_ops macro for initialising suspend/resume callbacks
Use SET_SYSTEM_SLEEP_PM_OPS for setting suspend/resume callbacks for dev_pm_ops. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-tps65910.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 7ef42c25358c..ff7cfe90b0c0 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -22,6 +22,7 @@
22#include <linux/rtc.h> 22#include <linux/rtc.h>
23#include <linux/bcd.h> 23#include <linux/bcd.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/pm_runtime.h>
25#include <linux/interrupt.h> 26#include <linux/interrupt.h>
26#include <linux/mfd/tps65910.h> 27#include <linux/mfd/tps65910.h>
27 28
@@ -304,7 +305,6 @@ static int tps65910_rtc_remove(struct platform_device *pdev)
304} 305}
305 306
306#ifdef CONFIG_PM_SLEEP 307#ifdef CONFIG_PM_SLEEP
307
308static int tps65910_rtc_suspend(struct device *dev) 308static int tps65910_rtc_suspend(struct device *dev)
309{ 309{
310 struct tps65910_rtc *tps_rtc = dev_get_drvdata(dev); 310 struct tps65910_rtc *tps_rtc = dev_get_drvdata(dev);
@@ -322,24 +322,19 @@ static int tps65910_rtc_resume(struct device *dev)
322 disable_irq_wake(tps_rtc->irq); 322 disable_irq_wake(tps_rtc->irq);
323 return 0; 323 return 0;
324} 324}
325#endif
325 326
326static const struct dev_pm_ops tps65910_rtc_pm_ops = { 327static const struct dev_pm_ops tps65910_rtc_pm_ops = {
327 .suspend = tps65910_rtc_suspend, 328 SET_SYSTEM_SLEEP_PM_OPS(tps65910_rtc_suspend, tps65910_rtc_resume)
328 .resume = tps65910_rtc_resume,
329}; 329};
330 330
331#define DEV_PM_OPS (&tps65910_rtc_pm_ops)
332#else
333#define DEV_PM_OPS NULL
334#endif
335
336static struct platform_driver tps65910_rtc_driver = { 331static struct platform_driver tps65910_rtc_driver = {
337 .probe = tps65910_rtc_probe, 332 .probe = tps65910_rtc_probe,
338 .remove = tps65910_rtc_remove, 333 .remove = tps65910_rtc_remove,
339 .driver = { 334 .driver = {
340 .owner = THIS_MODULE, 335 .owner = THIS_MODULE,
341 .name = "tps65910-rtc", 336 .name = "tps65910-rtc",
342 .pm = DEV_PM_OPS, 337 .pm = &tps65910_rtc_pm_ops,
343 }, 338 },
344}; 339};
345 340