ACPI: thinkpad-acpi: refactor hotkey_get and hotkey_set
commitda9a6e6cecfabf4874a46a6147bfd89d9452b3eb
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 3 Oct 2007 04:43:53 +0000 (3 01:43 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 3 Oct 2007 01:50:07 +0000 (2 22:50 -0300)
tree8ebbb73b76d2a91395cedc49f3e66de88a0c8ba2
parentea17b198e2cf068efb1eb9165b18edc28aa51bae
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