diff mbox

thinkpad-acpi: setup hotkey polling after changing hotkey_driver_mask

Message ID 20100208155059.eed393a6.akpm@linux-foundation.org (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Andrew Morton Feb. 8, 2010, 11:50 p.m. UTC
None
diff mbox

Patch

--- a/drivers/platform/x86/thinkpad_acpi.c~thinkpad-acpi-setup-hotkey-polling-after-changing-hotkey_driver_mask-fix
+++ a/drivers/platform/x86/thinkpad_acpi.c
@@ -2597,6 +2597,10 @@  static void hotkey_poll_set_freq(unsigne
 
 #else /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */
 
+static void hotkey_poll_setup(bool __unused)
+{
+}
+
 static void hotkey_poll_setup_safe(bool __unused)
 {
 }
@@ -2694,9 +2698,7 @@  static ssize_t hotkey_mask_store(struct 
 
 	res = hotkey_user_mask_set(t);
 
-#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
 	hotkey_poll_setup(true);
-#endif
 
 	mutex_unlock(&hotkey_mutex);
 
@@ -6273,9 +6275,7 @@  static int __init brightness_init(struct
 				| TP_ACPI_HKEY_BRGHTUP_MASK
 				| TP_ACPI_HKEY_BRGHTDWN_MASK);;
 
-#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
-	hotkey_poll_setup(true);
-#endif
+	hotkey_poll_setup_safe(true);
 
 	return 0;
 }