thinkpad-acpi: sync input device EV_SW initial state
commit1c78f736229e0c8a1b4de63c34dcc67d0eb5ede3
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 13 Dec 2009 19:10:48 +0000 (13 17:10 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 13 Dec 2009 19:10:48 +0000 (13 17:10 -0200)
tree5e0814fe56f0b599435266abe72f32e702d10eb2
parentc52305e68a832ae56c81e41ee49f6feb86d32895
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