ACPI: thinkpad-acpi: refactor hotkey_get and hotkey_set
commit0a5f989b84e1a114895a64f4c9c7482697313b19
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>
Sun, 7 Oct 2007 21:43:26 +0000 (7 18:43 -0300)
tree5ff8c5ced30023be359fc076e49b4df0becf4e0b
parent7d6f4f37c56c7e8137eab5629e37b66582736db2
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