ACPI: thinkpad-acpi: refactor hotkey_get and hotkey_set
commit038454fe357b1a6157f8edc3de93871a1805557d
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 5 Oct 2007 03:07:34 +0000 (5 00:07 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 30 Oct 2007 22:47:53 +0000 (30 20:47 -0200)
tree41c5b2cc5b3a8e089611e3f16ad82704dc6c11a3
parent427c94d09ccaac6c8cdd57e69025df4d6dbd41ec
ACPI: thinkpad-acpi: refactor hotkey_get and hotkey_set

This patch:

1. Splits hotkey_get/set into hotkey_status_get/set and hotkey_mask_get/set;
2. Caches the status of hot key mask for later driver use;
3. Makes sure the cache of hot key mask is refreshed when needed;
4. logs a printk notice when the firmware doesn't set the hot key
   mask to exactly what we asked it to;
5. Do the proper locking on the data structures.

Only (4) is user-noticeable, unless (5) fixes some corner-case races.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
drivers/misc/thinkpad_acpi.c
drivers/misc/thinkpad_acpi.h