aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/cy8ctmg110_ts.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/cy8ctmg110_ts.c')
-rw-r--r--drivers/input/touchscreen/cy8ctmg110_ts.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c
index d0c3a7229ad..a93c5c26ab3 100644
--- a/drivers/input/touchscreen/cy8ctmg110_ts.c
+++ b/drivers/input/touchscreen/cy8ctmg110_ts.c
@@ -280,8 +280,9 @@ err_free_mem:
280} 280}
281 281
282#ifdef CONFIG_PM 282#ifdef CONFIG_PM
283static int cy8ctmg110_suspend(struct i2c_client *client, pm_message_t mesg) 283static int cy8ctmg110_suspend(struct device *dev)
284{ 284{
285 struct i2c_client *client = to_i2c_client(dev);
285 struct cy8ctmg110 *ts = i2c_get_clientdata(client); 286 struct cy8ctmg110 *ts = i2c_get_clientdata(client);
286 287
287 if (device_may_wakeup(&client->dev)) 288 if (device_may_wakeup(&client->dev))
@@ -293,8 +294,9 @@ static int cy8ctmg110_suspend(struct i2c_client *client, pm_message_t mesg)
293 return 0; 294 return 0;
294} 295}
295 296
296static int cy8ctmg110_resume(struct i2c_client *client) 297static int cy8ctmg110_resume(struct device *dev)
297{ 298{
299 struct i2c_client *client = to_i2c_client(dev);
298 struct cy8ctmg110 *ts = i2c_get_clientdata(client); 300 struct cy8ctmg110 *ts = i2c_get_clientdata(client);
299 301
300 if (device_may_wakeup(&client->dev)) 302 if (device_may_wakeup(&client->dev))
@@ -305,6 +307,8 @@ static int cy8ctmg110_resume(struct i2c_client *client)
305 } 307 }
306 return 0; 308 return 0;
307} 309}
310
311static SIMPLE_DEV_PM_OPS(cy8ctmg110_pm, cy8ctmg110_suspend, cy8ctmg110_resume);
308#endif 312#endif
309 313
310static int __devexit cy8ctmg110_remove(struct i2c_client *client) 314static int __devexit cy8ctmg110_remove(struct i2c_client *client)
@@ -335,14 +339,13 @@ static struct i2c_driver cy8ctmg110_driver = {
335 .driver = { 339 .driver = {
336 .owner = THIS_MODULE, 340 .owner = THIS_MODULE,
337 .name = CY8CTMG110_DRIVER_NAME, 341 .name = CY8CTMG110_DRIVER_NAME,
342#ifdef CONFIG_PM
343 .pm = &cy8ctmg110_pm,
344#endif
338 }, 345 },
339 .id_table = cy8ctmg110_idtable, 346 .id_table = cy8ctmg110_idtable,
340 .probe = cy8ctmg110_probe, 347 .probe = cy8ctmg110_probe,
341 .remove = __devexit_p(cy8ctmg110_remove), 348 .remove = __devexit_p(cy8ctmg110_remove),
342#ifdef CONFIG_PM
343 .suspend = cy8ctmg110_suspend,
344 .resume = cy8ctmg110_resume,
345#endif
346}; 349};
347 350
348static int __init cy8ctmg110_init(void) 351static int __init cy8ctmg110_init(void)