提交 ddaa4343 编写于 作者: T Thadeu Lima de Souza Cascardo 提交者: Dmitry Torokhov

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: NThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 bab7614d
......@@ -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;
}
......
......@@ -935,10 +935,11 @@ static int serio_suspend(struct device *dev, pm_message_t state)
{
struct serio *serio = to_serio_port(dev);
if (!serio->suspended && state.event == PM_EVENT_SUSPEND) {
if (!serio->suspended && state.event == PM_EVENT_SUSPEND)
serio_cleanup(serio);
serio->suspended = true;
}
serio->suspended = state.event == PM_EVENT_SUSPEND ||
state.event == PM_EVENT_FREEZE;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册