aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/ep93xx_keypad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/ep93xx_keypad.c')
-rw-r--r--drivers/input/keyboard/ep93xx_keypad.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
index 0ba69f3fcb52..df194bdaab50 100644
--- a/drivers/input/keyboard/ep93xx_keypad.c
+++ b/drivers/input/keyboard/ep93xx_keypad.c
@@ -182,16 +182,10 @@ static void ep93xx_keypad_close(struct input_dev *pdev)
182} 182}
183 183
184 184
185#ifdef CONFIG_PM 185#ifdef CONFIG_PM_SLEEP
186/* 186static int ep93xx_keypad_suspend(struct device *dev)
187 * NOTE: I don't know if this is correct, or will work on the ep93xx.
188 *
189 * None of the existing ep93xx drivers have power management support.
190 * But, this is basically what the pxa27x_keypad driver does.
191 */
192static int ep93xx_keypad_suspend(struct platform_device *pdev,
193 pm_message_t state)
194{ 187{
188 struct platform_device *pdev = to_platform_device(dev);
195 struct ep93xx_keypad *keypad = platform_get_drvdata(pdev); 189 struct ep93xx_keypad *keypad = platform_get_drvdata(pdev);
196 struct input_dev *input_dev = keypad->input_dev; 190 struct input_dev *input_dev = keypad->input_dev;
197 191
@@ -210,8 +204,9 @@ static int ep93xx_keypad_suspend(struct platform_device *pdev,
210 return 0; 204 return 0;
211} 205}
212 206
213static int ep93xx_keypad_resume(struct platform_device *pdev) 207static int ep93xx_keypad_resume(struct device *dev)
214{ 208{
209 struct platform_device *pdev = to_platform_device(dev);
215 struct ep93xx_keypad *keypad = platform_get_drvdata(pdev); 210 struct ep93xx_keypad *keypad = platform_get_drvdata(pdev);
216 struct input_dev *input_dev = keypad->input_dev; 211 struct input_dev *input_dev = keypad->input_dev;
217 212
@@ -232,10 +227,10 @@ static int ep93xx_keypad_resume(struct platform_device *pdev)
232 227
233 return 0; 228 return 0;
234} 229}
235#else /* !CONFIG_PM */ 230#endif
236#define ep93xx_keypad_suspend NULL 231
237#define ep93xx_keypad_resume NULL 232static SIMPLE_DEV_PM_OPS(ep93xx_keypad_pm_ops,
238#endif /* !CONFIG_PM */ 233 ep93xx_keypad_suspend, ep93xx_keypad_resume);
239 234
240static int __devinit ep93xx_keypad_probe(struct platform_device *pdev) 235static int __devinit ep93xx_keypad_probe(struct platform_device *pdev)
241{ 236{
@@ -384,11 +379,10 @@ static struct platform_driver ep93xx_keypad_driver = {
384 .driver = { 379 .driver = {
385 .name = "ep93xx-keypad", 380 .name = "ep93xx-keypad",
386 .owner = THIS_MODULE, 381 .owner = THIS_MODULE,
382 .pm = &ep93xx_keypad_pm_ops,
387 }, 383 },
388 .probe = ep93xx_keypad_probe, 384 .probe = ep93xx_keypad_probe,
389 .remove = __devexit_p(ep93xx_keypad_remove), 385 .remove = __devexit_p(ep93xx_keypad_remove),
390 .suspend = ep93xx_keypad_suspend,
391 .resume = ep93xx_keypad_resume,
392}; 386};
393module_platform_driver(ep93xx_keypad_driver); 387module_platform_driver(ep93xx_keypad_driver);
394 388