aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-04 22:17:57 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-04 22:19:37 -0800
commit3db8a537c6e2270bb09aadc229407b3532c57a81 (patch)
tree361ce42b4382b7288f6080cd83cb3ea88c9972b4 /drivers
parentee9dfd7a1d1256b0f51a0bf54bed0a8927c8e2ea (diff)
Input: ucb1400_ts - convert to use dev_pm_ops
Instead of using legacy PM interfaces switch to using dev_pm_ops. Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/ucb1400_ts.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index cf2440f537a..dff748d43a8 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -428,10 +428,10 @@ static int ucb1400_ts_remove(struct platform_device *dev)
return 0;
}
-#ifdef CONFIG_PM
-static int ucb1400_ts_resume(struct platform_device *dev)
+#ifdef CONFIG_PM_SLEEP
+static int ucb1400_ts_resume(struct device *dev)
{
- struct ucb1400_ts *ucb = dev->dev.platform_data;
+ struct ucb1400_ts *ucb = dev->platform_data;
if (ucb->ts_task) {
/*
@@ -444,16 +444,16 @@ static int ucb1400_ts_resume(struct platform_device *dev)
}
return 0;
}
-#else
-#define ucb1400_ts_resume NULL
#endif
+static SIMPLE_DEV_PM_OPS(ucb1400_ts_pm_ops, NULL, ucb1400_ts_resume);
+
static struct platform_driver ucb1400_ts_driver = {
.probe = ucb1400_ts_probe,
.remove = ucb1400_ts_remove,
- .resume = ucb1400_ts_resume,
.driver = {
.name = "ucb1400_ts",
+ .pm = &ucb1400_ts_pm_ops,
},
};
module_platform_driver(ucb1400_ts_driver);