Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306584
b: refs/heads/master
c: b5e9528
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Apr 11, 2012
1 parent bcc30cf commit 2589ffe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d568778298f58330bcc8cc23845676d1143c8d33
refs/heads/master: b5e9528bd19c6a3379aac468186f41d2bda48b04
26 changes: 10 additions & 16 deletions trunk/drivers/input/keyboard/ep93xx_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,10 @@ static void ep93xx_keypad_close(struct input_dev *pdev)
}


#ifdef CONFIG_PM
/*
* NOTE: I don't know if this is correct, or will work on the ep93xx.
*
* None of the existing ep93xx drivers have power management support.
* But, this is basically what the pxa27x_keypad driver does.
*/
static int ep93xx_keypad_suspend(struct platform_device *pdev,
pm_message_t state)
#ifdef CONFIG_PM_SLEEP
static int ep93xx_keypad_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct ep93xx_keypad *keypad = platform_get_drvdata(pdev);
struct input_dev *input_dev = keypad->input_dev;

Expand All @@ -210,8 +204,9 @@ static int ep93xx_keypad_suspend(struct platform_device *pdev,
return 0;
}

static int ep93xx_keypad_resume(struct platform_device *pdev)
static int ep93xx_keypad_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct ep93xx_keypad *keypad = platform_get_drvdata(pdev);
struct input_dev *input_dev = keypad->input_dev;

Expand All @@ -232,10 +227,10 @@ static int ep93xx_keypad_resume(struct platform_device *pdev)

return 0;
}
#else /* !CONFIG_PM */
#define ep93xx_keypad_suspend NULL
#define ep93xx_keypad_resume NULL
#endif /* !CONFIG_PM */
#endif

static SIMPLE_DEV_PM_OPS(ep93xx_keypad_pm_ops,
ep93xx_keypad_suspend, ep93xx_keypad_resume);

static int __devinit ep93xx_keypad_probe(struct platform_device *pdev)
{
Expand Down Expand Up @@ -384,11 +379,10 @@ static struct platform_driver ep93xx_keypad_driver = {
.driver = {
.name = "ep93xx-keypad",
.owner = THIS_MODULE,
.pm = &ep93xx_keypad_pm_ops,
},
.probe = ep93xx_keypad_probe,
.remove = __devexit_p(ep93xx_keypad_remove),
.suspend = ep93xx_keypad_suspend,
.resume = ep93xx_keypad_resume,
};
module_platform_driver(ep93xx_keypad_driver);

Expand Down

0 comments on commit 2589ffe

Please sign in to comment.