platform/x86: thinkpad_acpi: Take hotkey_mutex during hotkey_exit()
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Apr 2024 12:28:11 +0000 (14:28 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 29 Apr 2024 09:39:20 +0000 (11:39 +0200)
commite397c564298c2e91aea3887990da8e8eddb65277
treea15d241b6381c78de808cf2389d5a3b258d3fcf4
parent5c94664cf2793e0d0534cb561f1549ed4bb841f1
platform/x86: thinkpad_acpi: Take hotkey_mutex during hotkey_exit()

hotkey_exit() already takes the mutex around the hotkey_poll_stop_sync()
call, but not around the other calls.

commit 38831eaf7d4c ("platform/x86: thinkpad_acpi: use lockdep
annotations") has added lockdep_assert_held() checks to various hotkey
functions.

These lockdep_assert_held() checks fail causing WARN() backtraces in
dmesg due to missing locking in hotkey_exit(), fix this.

Fixes: 38831eaf7d4c ("platform/x86: thinkpad_acpi: use lockdep annotations")
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240424122834.19801-2-hdegoede@redhat.com
drivers/platform/x86/thinkpad_acpi.c