thinkpad-acpi: make driver events work in NVRAM poll mode
commit69bf790b9b5e3f852a3a17f126402984f84a102b
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 13 May 2011 12:22:33 +0000 (13 09:22 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 13 May 2011 12:22:33 +0000 (13 09:22 -0300)
tree31570ebcb0a523f3b9ceb3853f9a325a4f1f5000
parent95ce24c4dfa7c31473dbaaef3be3d3bd2907bd30
thinkpad-acpi: make driver events work in NVRAM poll mode

Thadeu Lima de Souza Cascardo reports this:

Brightness notification does not work until the user writes to
hotkey_mask attribute.  That's because the polling thread will only run
if hotkey_user_mask is set and someone is reading the input device or
if hotkey_driver_mask is set.  In this second case, this condition is
not tested after the mask is changed, because the brightness and
volume drivers are started after the hotkey drivers.

Fix tpacpi_hotkey_driver_mask_set() to call hotkey_poll_setup(), so
that the poller kthread will be started when needed.

Reported-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Andrew Morton <akpm@linux-foundation.org>
drivers/platform/x86/thinkpad_acpi.c