public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 26/57] ACPI: Always report a sync event after a lid state change
       [not found] ` <20081104233028.GA659@suse.de>
@ 2008-11-04 23:31   ` Greg KH
  0 siblings, 0 replies; only message in thread
From: Greg KH @ 2008-11-04 23:31 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
	Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
	alan, linux-acpi, Guillem Jover, Dmitry Torokhov, Len Brown

[-- Attachment #1: acpi-always-report-a-sync-event-after-a-lid-state-change.patch --]
[-- Type: text/plain, Size: 1527 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------
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);

-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-04 23:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20081104232144.186593464@mini.kroah.org>
     [not found] ` <20081104233028.GA659@suse.de>
2008-11-04 23:31   ` [patch 26/57] ACPI: Always report a sync event after a lid state change Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox