aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-11-18 03:14:03 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-11-18 03:16:53 -0500
commit8b5fce06f8795d9a7f8d1f03f743fc8befa66b3b (patch)
tree8cf54edac492456727bdab7163975d00aeabc749 /drivers/input
parente3f0f0a6c11b049f1be603dcfec82d2a8643f5fd (diff)
Input: qt602240_ts - convert to using dev_pm_ops
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/qt602240_ts.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/qt602240_ts.c b/drivers/input/touchscreen/qt602240_ts.c
index 66b26ad3032a..125e50ddef7f 100644
--- a/drivers/input/touchscreen/qt602240_ts.c
+++ b/drivers/input/touchscreen/qt602240_ts.c
@@ -1324,8 +1324,9 @@ static int __devexit qt602240_remove(struct i2c_client *client)
1324} 1324}
1325 1325
1326#ifdef CONFIG_PM 1326#ifdef CONFIG_PM
1327static int qt602240_suspend(struct i2c_client *client, pm_message_t mesg) 1327static int qt602240_suspend(struct device *dev)
1328{ 1328{
1329 struct i2c_client *client = to_i2c_client(dev);
1329 struct qt602240_data *data = i2c_get_clientdata(client); 1330 struct qt602240_data *data = i2c_get_clientdata(client);
1330 struct input_dev *input_dev = data->input_dev; 1331 struct input_dev *input_dev = data->input_dev;
1331 1332
@@ -1339,8 +1340,9 @@ static int qt602240_suspend(struct i2c_client *client, pm_message_t mesg)
1339 return 0; 1340 return 0;
1340} 1341}
1341 1342
1342static int qt602240_resume(struct i2c_client *client) 1343static int qt602240_resume(struct device *dev)
1343{ 1344{
1345 struct i2c_client *client = to_i2c_client(dev);
1344 struct qt602240_data *data = i2c_get_clientdata(client); 1346 struct qt602240_data *data = i2c_get_clientdata(client);
1345 struct input_dev *input_dev = data->input_dev; 1347 struct input_dev *input_dev = data->input_dev;
1346 1348
@@ -1359,9 +1361,11 @@ static int qt602240_resume(struct i2c_client *client)
1359 1361
1360 return 0; 1362 return 0;
1361} 1363}
1362#else 1364
1363#define qt602240_suspend NULL 1365static const struct dev_pm_ops qt602240_pm_ops = {
1364#define qt602240_resume NULL 1366 .suspend = qt602240_suspend,
1367 .resume = qt602240_resume,
1368};
1365#endif 1369#endif
1366 1370
1367static const struct i2c_device_id qt602240_id[] = { 1371static const struct i2c_device_id qt602240_id[] = {
@@ -1374,11 +1378,12 @@ static struct i2c_driver qt602240_driver = {
1374 .driver = { 1378 .driver = {
1375 .name = "qt602240_ts", 1379 .name = "qt602240_ts",
1376 .owner = THIS_MODULE, 1380 .owner = THIS_MODULE,
1381#ifdef CONFIG_PM
1382 .pm = &qt602240_pm_ops,
1383#endif
1377 }, 1384 },
1378 .probe = qt602240_probe, 1385 .probe = qt602240_probe,
1379 .remove = __devexit_p(qt602240_remove), 1386 .remove = __devexit_p(qt602240_remove),
1380 .suspend = qt602240_suspend,
1381 .resume = qt602240_resume,
1382 .id_table = qt602240_id, 1387 .id_table = qt602240_id,
1383}; 1388};
1384 1389