summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042.c
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>2009-07-07 22:10:02 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-07 22:46:58 -0700
commitddaa43433dd77535e4e132787f199f58ce224f44 (patch)
treedbad5b4caa825aa3d89f7b8fda014ea72feabffc /drivers/input/serio/i8042.c
parentbab7614d6d1b1fc96ec6c5a7ca34c8641060e659 (diff)
downloadlinux-ddaa43433dd77535e4e132787f199f58ce224f44.tar.bz2
Input: mark serio and i8042 as suspended when hibernating too
Serio ports are not being restarted any longer because resume operations after hibernate do nothing, since the device has not been marked as suspended. This happens because suspend is only considering the SUSPEND event but not the FREEZE event. Note that this driver has still to migrate to dev_pm_ops, but this fixes this particular bug now. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio/i8042.c')
-rw-r--r--drivers/input/serio/i8042.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index f919bf57293c..582245c497eb 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -934,10 +934,11 @@ static bool i8042_suspended;
static int i8042_suspend(struct platform_device *dev, pm_message_t state)
{
- if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) {
+ if (!i8042_suspended && state.event == PM_EVENT_SUSPEND)
i8042_controller_reset();
- i8042_suspended = true;
- }
+
+ i8042_suspended = state.event == PM_EVENT_SUSPEND ||
+ state.event == PM_EVENT_FREEZE;
return 0;
}