thinkpad-acpi: sync input device EV_SW initial state
commit138d6f00710a7e00f8435b3d54e2be5adbd99281
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 13 Dec 2009 18:59:53 +0000 (13 16:59 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 13 Dec 2009 18:59:53 +0000 (13 16:59 -0200)
tree1942007eb259892a54f2e26a14b5d1d148227310
parent32ccc75f9100f0dbd874487d8c486bb0e8e7cc9c
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