提交 df316e93 编写于 作者: G Guillem Jover 提交者: Len Brown

ACPI: Always report a sync event after a lid state change

Currently not always an EV_SYN event is reported to userland
after the EV_SW SW_LID event has been sent. This is easy to verify
by using “input-events” from input-utils and just closing and opening
the lid.
Signed-off-by: NGuillem Jover <guillem.jover@nokia.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 16be87ea
......@@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct acpi_button *button)
return -ENODEV;
/* input layer checks if event is redundant */
input_report_switch(button->input, SW_LID, !state);
input_sync(button->input);
return 0;
}
......@@ -285,8 +286,8 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
input_report_key(input, keycode, 1);
input_sync(input);
input_report_key(input, keycode, 0);
input_sync(input);
}
input_sync(input);
acpi_bus_generate_proc_event(button->device, event,
++button->pushed);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册