thinkpad-acpi: sync input device EV_SW initial state
commitadc0e83806464b3bc3ba78d99c148dfd49122715
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 15 Dec 2009 23:51:06 +0000 (15 21:51 -0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:41:22 +0000 (26 07:41 -0700)
tree2f0ba17af5be14d9370ee9d6be368e06105c7bed
parentda72e178aa50a69a159ddd8970ee3b947753a449
thinkpad-acpi: sync input device EV_SW initial state

commit d89a727aff649f6768f7a34ee57f031ebf8bab4c upstream.

Before we register the input device, sync the input layer EV_SW state
through a call to input_report_switch(), to avoid issuing a gratuitous
event for the initial state of these switches.

This fixes some annoyances caused by the interaction with rfkill and
EV_SW SW_RFKILL_ALL events.

Reported-by: Kevin Locke <kevin@kevinlocke.name>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/platform/x86/thinkpad_acpi.c