summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDaniel Kurtz2012-05-09 07:29:14 +0200
committerDmitry Torokhov2012-05-11 05:39:04 +0200
commit3a73c8169e4f56c1161a95985b8489dd04a7bcbe (patch)
tree7a41190a5c0aeac6d0546f9a0906be9c2c9829ae /drivers/input
parentInput: sentelic - report device's production serial number (diff)
downloadkernel-qcow2-linux-3a73c8169e4f56c1161a95985b8489dd04a7bcbe.tar.gz
kernel-qcow2-linux-3a73c8169e4f56c1161a95985b8489dd04a7bcbe.tar.xz
kernel-qcow2-linux-3a73c8169e4f56c1161a95985b8489dd04a7bcbe.zip
Input: atmel_mxt_ts - use CONFIG_PM_SLEEP
Simple cleanup to use newer PM APIs. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 19d4ea65ea01..0a6e368a5a9c 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1201,7 +1201,7 @@ static int __devexit mxt_remove(struct i2c_client *client)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int mxt_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
@@ -1239,13 +1239,10 @@ static int mxt_resume(struct device *dev)
return 0;
}
-
-static const struct dev_pm_ops mxt_pm_ops = {
- .suspend = mxt_suspend,
- .resume = mxt_resume,
-};
#endif
+static SIMPLE_DEV_PM_OPS(mxt_pm_ops, mxt_suspend, mxt_resume);
+
static const struct i2c_device_id mxt_id[] = {
{ "qt602240_ts", 0 },
{ "atmel_mxt_ts", 0 },
@@ -1258,9 +1255,7 @@ static struct i2c_driver mxt_driver = {
.driver = {
.name = "atmel_mxt_ts",
.owner = THIS_MODULE,
-#ifdef CONFIG_PM
.pm = &mxt_pm_ops,
-#endif
},
.probe = mxt_probe,
.remove = __devexit_p(mxt_remove),