summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorGuillem Jover <guillem.jover@nokia.com>2008-10-28 01:34:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-11-06 19:05:45 -0800
commitfe40aac3d64f616a053d06fa328fc193b4789e71 (patch)
tree2acc78090ccb598602ad4a226651ab94a6dd72a7 /drivers/acpi
parentbaae4f5fd7a75bdfa70d374b738963053df2bcaa (diff)
ACPI: Always report a sync event after a lid state change
upstream commit df316e939100e789b3c5d4d102619ccf5834bd00 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: Guillem Jover <guillem.jover@nokia.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/button.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 1dfec413588c..59352d9dfb3c 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -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);