aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2009-09-20 13:09:23 -0400
committerLen Brown <len.brown@intel.com>2009-09-20 13:44:25 -0400
commit4be73005e4dcf111fa88f7265ed147e2de38b075 (patch)
treed0840ac623f77052e7bfea025ff4f8298acf4eb3 /drivers
parent435c47e20bc212d0fa6652ac93fae8eaee7b9b34 (diff)
thinkpad-acpi: remove uneeded tp_features.hotkey tests in hotkey_exit
hotkey_exit() is only called if hotkey_init() finished sucessfully, or by direct calls inside hotkey_init(). The tp_features.hotkey test is always true, and just adds to the confusion, remove it. Also, avoid calling hotkey_mask_set() when it won't do anything useful. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index b789ee8bc14e..1b4d6f686bf0 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2843,16 +2843,14 @@ static void hotkey_exit(void)
2843 2843
2844 kfree(hotkey_keycode_map); 2844 kfree(hotkey_keycode_map);
2845 2845
2846 if (tp_features.hotkey) { 2846 dbg_printk(TPACPI_DBG_EXIT | TPACPI_DBG_HKEY,
2847 dbg_printk(TPACPI_DBG_EXIT | TPACPI_DBG_HKEY, 2847 "restoring original hot key mask\n");
2848 "restoring original hot key mask\n"); 2848 /* no short-circuit boolean operator below! */
2849 /* no short-circuit boolean operator below! */ 2849 if (((tp_features.hotkey_mask && hotkey_mask_set(hotkey_orig_mask))
2850 if ((hotkey_mask_set(hotkey_orig_mask) | 2850 | hotkey_status_set(false)) != 0)
2851 hotkey_status_set(false)) != 0) 2851 printk(TPACPI_ERR
2852 printk(TPACPI_ERR 2852 "failed to restore hot key mask "
2853 "failed to restore hot key mask " 2853 "to BIOS defaults\n");
2854 "to BIOS defaults\n");
2855 }
2856} 2854}
2857 2855
2858static void __init hotkey_unmap(const unsigned int scancode) 2856static void __init hotkey_unmap(const unsigned int scancode)