thinkpad-acpi: sync input device EV_SW initial state
commitf358422437b74054c96a408a8aac5bd0cf44302e
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 13 May 2011 12:22:22 +0000 (13 09:22 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 13 May 2011 12:22:22 +0000 (13 09:22 -0300)
tree6c2c3460bac070790ef8f29504d82c078ea7b487
parent591b12906c0a0521120f2f995967743b89e77d5a
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