ACPI: thinkpad-acpi: refactor hotkey_get and hotkey_set (v2)
commit98f7be38fb5ecd8ff43371694ffc16aac359d419
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Fri, 5 Oct 2007 12:07:34 +0000 (5 09:07 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 26 Feb 2008 02:34:08 +0000 (25 23:34 -0300)
tree6ff70e5fbbbd7916df74c554ad3df9bf0ae6253e
parent4c94704c274fbe2c4c311057ccc940f627be4666
ACPI: thinkpad-acpi: refactor hotkey_get and hotkey_set (v2)

Refactor and organize the code a bit for the NVRAM polling support:

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

Only (4) should be user-noticeable, but there is a chance (5) fixes
some unknown/unreported race conditions.

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