thinkpad-acpi: make driver events work in NVRAM poll mode
commitd2e304dbefac9869cb666fa4e63afcaa3d4320cb
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 7 Jul 2010 02:07:14 +0000 (6 23:07 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 7 Jul 2010 02:07:14 +0000 (6 23:07 -0300)
tree150507d9ebc0116151a0579e2c4d87339fcc82f2
parent13d9a2f1c322a0b1eae0e59eb5763c8a3a9f48c3
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