diff options
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 933bcc477f4a..5f450831e5f0 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -2082,6 +2082,7 @@ static struct attribute_set *hotkey_dev_attributes; | |||
2082 | 2082 | ||
2083 | static void tpacpi_driver_event(const unsigned int hkey_event); | 2083 | static void tpacpi_driver_event(const unsigned int hkey_event); |
2084 | static void hotkey_driver_event(const unsigned int scancode); | 2084 | static void hotkey_driver_event(const unsigned int scancode); |
2085 | static void hotkey_poll_setup(const bool may_warn); | ||
2085 | 2086 | ||
2086 | /* HKEY.MHKG() return bits */ | 2087 | /* HKEY.MHKG() return bits */ |
2087 | #define TP_HOTKEY_TABLET_MASK (1 << 3) | 2088 | #define TP_HOTKEY_TABLET_MASK (1 << 3) |
@@ -2264,6 +2265,8 @@ static int tpacpi_hotkey_driver_mask_set(const u32 mask) | |||
2264 | 2265 | ||
2265 | rc = hotkey_mask_set((hotkey_acpi_mask | hotkey_driver_mask) & | 2266 | rc = hotkey_mask_set((hotkey_acpi_mask | hotkey_driver_mask) & |
2266 | ~hotkey_source_mask); | 2267 | ~hotkey_source_mask); |
2268 | hotkey_poll_setup(true); | ||
2269 | |||
2267 | mutex_unlock(&hotkey_mutex); | 2270 | mutex_unlock(&hotkey_mutex); |
2268 | 2271 | ||
2269 | return rc; | 2272 | return rc; |
@@ -2548,7 +2551,7 @@ static void hotkey_poll_stop_sync(void) | |||
2548 | } | 2551 | } |
2549 | 2552 | ||
2550 | /* call with hotkey_mutex held */ | 2553 | /* call with hotkey_mutex held */ |
2551 | static void hotkey_poll_setup(bool may_warn) | 2554 | static void hotkey_poll_setup(const bool may_warn) |
2552 | { | 2555 | { |
2553 | const u32 poll_driver_mask = hotkey_driver_mask & hotkey_source_mask; | 2556 | const u32 poll_driver_mask = hotkey_driver_mask & hotkey_source_mask; |
2554 | const u32 poll_user_mask = hotkey_user_mask & hotkey_source_mask; | 2557 | const u32 poll_user_mask = hotkey_user_mask & hotkey_source_mask; |
@@ -2579,7 +2582,7 @@ static void hotkey_poll_setup(bool may_warn) | |||
2579 | } | 2582 | } |
2580 | } | 2583 | } |
2581 | 2584 | ||
2582 | static void hotkey_poll_setup_safe(bool may_warn) | 2585 | static void hotkey_poll_setup_safe(const bool may_warn) |
2583 | { | 2586 | { |
2584 | mutex_lock(&hotkey_mutex); | 2587 | mutex_lock(&hotkey_mutex); |
2585 | hotkey_poll_setup(may_warn); | 2588 | hotkey_poll_setup(may_warn); |
@@ -2597,7 +2600,11 @@ static void hotkey_poll_set_freq(unsigned int freq) | |||
2597 | 2600 | ||
2598 | #else /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */ | 2601 | #else /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */ |
2599 | 2602 | ||
2600 | static void hotkey_poll_setup_safe(bool __unused) | 2603 | static void hotkey_poll_setup(const bool __unused) |
2604 | { | ||
2605 | } | ||
2606 | |||
2607 | static void hotkey_poll_setup_safe(const bool __unused) | ||
2601 | { | 2608 | { |
2602 | } | 2609 | } |
2603 | 2610 | ||