aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-03 14:30:28 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-04 12:25:40 -0400
commitb3571400395e318306165eabbfbe05a4c3e4366c (patch)
treeafc928164984dce6ad653e9012a006c9072b30f9 /drivers/input/touchscreen
parente6293d2f8a6cd427a1ef4ddecb16b1d5ae1929cd (diff)
Input: st1232 - switch to using SIMPLE_DEV_PM_OPS
Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/st1232.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
index 216fabb5accc..6cb68a1981bf 100644
--- a/drivers/input/touchscreen/st1232.c
+++ b/drivers/input/touchscreen/st1232.c
@@ -218,7 +218,7 @@ static int __devexit st1232_ts_remove(struct i2c_client *client)
218 return 0; 218 return 0;
219} 219}
220 220
221#ifdef CONFIG_PM 221#ifdef CONFIG_PM_SLEEP
222static int st1232_ts_suspend(struct device *dev) 222static int st1232_ts_suspend(struct device *dev)
223{ 223{
224 struct i2c_client *client = to_i2c_client(dev); 224 struct i2c_client *client = to_i2c_client(dev);
@@ -243,12 +243,11 @@ static int st1232_ts_resume(struct device *dev)
243 return 0; 243 return 0;
244} 244}
245 245
246static const struct dev_pm_ops st1232_ts_pm_ops = {
247 .suspend = st1232_ts_suspend,
248 .resume = st1232_ts_resume,
249};
250#endif 246#endif
251 247
248static SIMPLE_DEV_PM_OPS(st1232_ts_pm_ops,
249 st1232_ts_suspend, st1232_ts_resume);
250
252static const struct i2c_device_id st1232_ts_id[] = { 251static const struct i2c_device_id st1232_ts_id[] = {
253 { ST1232_TS_NAME, 0 }, 252 { ST1232_TS_NAME, 0 },
254 { } 253 { }
@@ -271,9 +270,7 @@ static struct i2c_driver st1232_ts_driver = {
271 .name = ST1232_TS_NAME, 270 .name = ST1232_TS_NAME,
272 .owner = THIS_MODULE, 271 .owner = THIS_MODULE,
273 .of_match_table = of_match_ptr(st1232_ts_dt_ids), 272 .of_match_table = of_match_ptr(st1232_ts_dt_ids),
274#ifdef CONFIG_PM
275 .pm = &st1232_ts_pm_ops, 273 .pm = &st1232_ts_pm_ops,
276#endif
277 }, 274 },
278}; 275};
279 276