aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/serio.c
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>2009-07-08 01:10:02 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-08 01:46:58 -0400
commitddaa43433dd77535e4e132787f199f58ce224f44 (patch)
treedbad5b4caa825aa3d89f7b8fda014ea72feabffc /drivers/input/serio/serio.c
parentbab7614d6d1b1fc96ec6c5a7ca34c8641060e659 (diff)
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/serio.c')
-rw-r--r--drivers/input/serio/serio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index fb17573f8f2d..d66f4944f2a0 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -935,10 +935,11 @@ static int serio_suspend(struct device *dev, pm_message_t state)
935{ 935{
936 struct serio *serio = to_serio_port(dev); 936 struct serio *serio = to_serio_port(dev);
937 937
938 if (!serio->suspended && state.event == PM_EVENT_SUSPEND) { 938 if (!serio->suspended && state.event == PM_EVENT_SUSPEND)
939 serio_cleanup(serio); 939 serio_cleanup(serio);
940 serio->suspended = true; 940
941 } 941 serio->suspended = state.event == PM_EVENT_SUSPEND ||
942 state.event == PM_EVENT_FREEZE;
942 943
943 return 0; 944 return 0;
944} 945}