blob: 574326dcd716d6dfda32e65bb7f74cffa2ff7a50 [file] [log] [blame]
From lenb@kernel.org Tue Nov 4 13:59:20 2008
From: Guillem Jover <guillem.jover@nokia.com>
Date: Tue, 28 Oct 2008 01:34:27 -0400 (EDT)
Subject: ACPI: Always report a sync event after a lid state change
To: stable@kernel.org
Cc: linux-acpi@vger.kernel.org
Message-ID: <alpine.LFD.2.00.0810280131390.24123@localhost.localdomain>
From: Guillem Jover <guillem.jover@nokia.com>
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>
---
drivers/acpi/button.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct ac
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_hand
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);