thinkpad-acpi: sync input device EV_SW initial state
commitaf6dc83bc4e0a87bf3eac9cba46259f03044c577
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 3 Apr 2010 21:44:38 +0000 (3 18:44 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 3 Apr 2010 21:44:38 +0000 (3 18:44 -0300)
tree9a8a02737f5a6202dd0c8535500d0e088cdf86dc
parentb1a326660e20320ced7106b0496d11a9bbf4f2f1
thinkpad-acpi: sync input device EV_SW initial state

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>
drivers/platform/x86/thinkpad_acpi.c