aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/ad714x-i2c.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/input/misc/ad714x-i2c.c b/drivers/input/misc/ad714x-i2c.c
index 2bef8fa56c94..e21deb1baa8a 100644
--- a/drivers/input/misc/ad714x-i2c.c
+++ b/drivers/input/misc/ad714x-i2c.c
@@ -10,23 +10,23 @@
10#include <linux/i2c.h> 10#include <linux/i2c.h>
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/pm.h>
13#include "ad714x.h" 14#include "ad714x.h"
14 15
15#ifdef CONFIG_PM 16#ifdef CONFIG_PM
16static int ad714x_i2c_suspend(struct i2c_client *client, pm_message_t message) 17static int ad714x_i2c_suspend(struct device *dev)
17{ 18{
18 return ad714x_disable(i2c_get_clientdata(client)); 19 return ad714x_disable(i2c_get_clientdata(to_i2c_client(dev)));
19} 20}
20 21
21static int ad714x_i2c_resume(struct i2c_client *client) 22static int ad714x_i2c_resume(struct device *dev)
22{ 23{
23 return ad714x_enable(i2c_get_clientdata(client)); 24 return ad714x_enable(i2c_get_clientdata(to_i2c_client(dev)));
24} 25}
25#else
26# define ad714x_i2c_suspend NULL
27# define ad714x_i2c_resume NULL
28#endif 26#endif
29 27
28static SIMPLE_DEV_PM_OPS(ad714x_i2c_pm, ad714x_i2c_suspend, ad714x_i2c_resume);
29
30static int ad714x_i2c_write(struct device *dev, unsigned short reg, 30static int ad714x_i2c_write(struct device *dev, unsigned short reg,
31 unsigned short data) 31 unsigned short data)
32{ 32{
@@ -114,11 +114,10 @@ MODULE_DEVICE_TABLE(i2c, ad714x_id);
114static struct i2c_driver ad714x_i2c_driver = { 114static struct i2c_driver ad714x_i2c_driver = {
115 .driver = { 115 .driver = {
116 .name = "ad714x_captouch", 116 .name = "ad714x_captouch",
117 .pm = &ad714x_i2c_pm,
117 }, 118 },
118 .probe = ad714x_i2c_probe, 119 .probe = ad714x_i2c_probe,
119 .remove = __devexit_p(ad714x_i2c_remove), 120 .remove = __devexit_p(ad714x_i2c_remove),
120 .suspend = ad714x_i2c_suspend,
121 .resume = ad714x_i2c_resume,
122 .id_table = ad714x_id, 121 .id_table = ad714x_id,
123}; 122};
124 123