thinkpad-acpi: sync input device EV_SW initial state
commit7e8ada66c6579efb08b24d163e9d1d8fbb684ba2
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 7 Jul 2010 02:06:46 +0000 (6 23:06 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 7 Jul 2010 02:06:46 +0000 (6 23:06 -0300)
treecd4f59d83cac66ac3f9d6474664bbc68f8bb31bd
parent92980a97f33aa8a1aba4faba11c0190cd801d3c7
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