diff options
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 723d37b9e6a2..6da3f40ac9f6 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -1417,6 +1417,14 @@ static void hotkey_poll_setup_safe(int may_warn) | |||
1417 | mutex_unlock(&hotkey_mutex); | 1417 | mutex_unlock(&hotkey_mutex); |
1418 | } | 1418 | } |
1419 | 1419 | ||
1420 | #else /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */ | ||
1421 | |||
1422 | static void hotkey_poll_setup_safe(int __unused) | ||
1423 | { | ||
1424 | } | ||
1425 | |||
1426 | #endif /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */ | ||
1427 | |||
1420 | static int hotkey_inputdev_open(struct input_dev *dev) | 1428 | static int hotkey_inputdev_open(struct input_dev *dev) |
1421 | { | 1429 | { |
1422 | switch (tpacpi_lifecycle) { | 1430 | switch (tpacpi_lifecycle) { |
@@ -1444,7 +1452,6 @@ static void hotkey_inputdev_close(struct input_dev *dev) | |||
1444 | if (tpacpi_lifecycle == TPACPI_LIFE_RUNNING) | 1452 | if (tpacpi_lifecycle == TPACPI_LIFE_RUNNING) |
1445 | hotkey_poll_setup_safe(0); | 1453 | hotkey_poll_setup_safe(0); |
1446 | } | 1454 | } |
1447 | #endif /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */ | ||
1448 | 1455 | ||
1449 | /* sysfs hotkey enable ------------------------------------------------- */ | 1456 | /* sysfs hotkey enable ------------------------------------------------- */ |
1450 | static ssize_t hotkey_enable_show(struct device *dev, | 1457 | static ssize_t hotkey_enable_show(struct device *dev, |
@@ -2023,12 +2030,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
2023 | (hotkey_report_mode < 2) ? | 2030 | (hotkey_report_mode < 2) ? |
2024 | "enabled" : "disabled"); | 2031 | "enabled" : "disabled"); |
2025 | 2032 | ||
2026 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL | ||
2027 | tpacpi_inputdev->open = &hotkey_inputdev_open; | 2033 | tpacpi_inputdev->open = &hotkey_inputdev_open; |
2028 | tpacpi_inputdev->close = &hotkey_inputdev_close; | 2034 | tpacpi_inputdev->close = &hotkey_inputdev_close; |
2029 | 2035 | ||
2030 | hotkey_poll_setup_safe(1); | 2036 | hotkey_poll_setup_safe(1); |
2031 | #endif | ||
2032 | } | 2037 | } |
2033 | 2038 | ||
2034 | return (tp_features.hotkey)? 0 : 1; | 2039 | return (tp_features.hotkey)? 0 : 1; |
@@ -2221,9 +2226,7 @@ static void hotkey_resume(void) | |||
2221 | hotkey_radio_sw_notify_change(); | 2226 | hotkey_radio_sw_notify_change(); |
2222 | hotkey_wakeup_reason_notify_change(); | 2227 | hotkey_wakeup_reason_notify_change(); |
2223 | hotkey_wakeup_hotunplug_complete_notify_change(); | 2228 | hotkey_wakeup_hotunplug_complete_notify_change(); |
2224 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL | ||
2225 | hotkey_poll_setup_safe(0); | 2229 | hotkey_poll_setup_safe(0); |
2226 | #endif | ||
2227 | } | 2230 | } |
2228 | 2231 | ||
2229 | /* procfs -------------------------------------------------------------- */ | 2232 | /* procfs -------------------------------------------------------------- */ |