aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-11-11 04:03:00 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-11-12 01:02:57 -0500
commit10ee2ded629b1571cef1182728d6f65dbe4c7f79 (patch)
tree1e46c58792f084b7f995177b21a0ee2719134e16 /drivers/input/misc
parent2a0591596b302adc654a1caf6bd3d0063407ea4b (diff)
Input: pcf_keypad - convert to dev_op_ops
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/pcf8574_keypad.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/input/misc/pcf8574_keypad.c b/drivers/input/misc/pcf8574_keypad.c
index d1583aea1721..08be1a355956 100644
--- a/drivers/input/misc/pcf8574_keypad.c
+++ b/drivers/input/misc/pcf8574_keypad.c
@@ -169,19 +169,29 @@ static int __devexit pcf8574_kp_remove(struct i2c_client *client)
169} 169}
170 170
171#ifdef CONFIG_PM 171#ifdef CONFIG_PM
172static int pcf8574_kp_resume(struct i2c_client *client) 172static int pcf8574_kp_resume(struct device *dev)
173{ 173{
174 struct i2c_client *client = to_i2c_client(dev);
175
174 enable_irq(client->irq); 176 enable_irq(client->irq);
175 177
176 return 0; 178 return 0;
177} 179}
178 180
179static int pcf8574_kp_suspend(struct i2c_client *client, pm_message_t mesg) 181static int pcf8574_kp_suspend(struct device *dev)
180{ 182{
183 struct i2c_client *client = to_i2c_client(dev);
184
181 disable_irq(client->irq); 185 disable_irq(client->irq);
182 186
183 return 0; 187 return 0;
184} 188}
189
190static const struct dev_pm_ops pcf8574_kp_pm_ops = {
191 .suspend = pcf8574_kp_suspend,
192 .resume = pcf8574_kp_resume,
193};
194
185#else 195#else
186# define pcf8574_kp_resume NULL 196# define pcf8574_kp_resume NULL
187# define pcf8574_kp_suspend NULL 197# define pcf8574_kp_suspend NULL
@@ -197,11 +207,12 @@ static struct i2c_driver pcf8574_kp_driver = {
197 .driver = { 207 .driver = {
198 .name = DRV_NAME, 208 .name = DRV_NAME,
199 .owner = THIS_MODULE, 209 .owner = THIS_MODULE,
210#ifdef CONFIG_PM
211 .pm = &pcf8574_kp_pm_ops,
212#endif
200 }, 213 },
201 .probe = pcf8574_kp_probe, 214 .probe = pcf8574_kp_probe,
202 .remove = __devexit_p(pcf8574_kp_remove), 215 .remove = __devexit_p(pcf8574_kp_remove),
203 .suspend = pcf8574_kp_suspend,
204 .resume = pcf8574_kp_resume,
205 .id_table = pcf8574_kp_id, 216 .id_table = pcf8574_kp_id,
206}; 217};
207 218