Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Thadeu Lima de Souza Cascardo and committed by
Dmitry Torokhov
ddaa4343 bab7614d

+8 -6
+4 -3
drivers/input/serio/i8042.c
··· 934 934 935 935 static int i8042_suspend(struct platform_device *dev, pm_message_t state) 936 936 { 937 - if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) { 937 + if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) 938 938 i8042_controller_reset(); 939 - i8042_suspended = true; 940 - } 939 + 940 + i8042_suspended = state.event == PM_EVENT_SUSPEND || 941 + state.event == PM_EVENT_FREEZE; 941 942 942 943 return 0; 943 944 }
+4 -3
drivers/input/serio/serio.c
··· 935 935 { 936 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 939 serio_cleanup(serio); 940 - serio->suspended = true; 941 - } 940 + 941 + serio->suspended = state.event == PM_EVENT_SUSPEND || 942 + state.event == PM_EVENT_FREEZE; 942 943 943 944 return 0; 944 945 }