Skip to content

Commit

Permalink
platform/x86: thinkpad_acpi: Take mutex in hotkey_resume
Browse files Browse the repository at this point in the history
hotkey_status_set expects the hotkey_mutex to be held.
It seems like it was missed here and that gives lockdep
warnings while resuming.

Fixes: 38831ea ("platform/x86: thinkpad_acpi: use lockdep annotations")
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Dennis Bonke <admin@dennisbonke.com>
Link: https://lore.kernel.org/r/20230914130356.235912-1-admin@dennisbonke.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Dennis Bonke authored and Hans de Goede committed Sep 18, 2023
1 parent 85e654c commit 81bf4a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/platform/x86/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -4116,9 +4116,11 @@ static void hotkey_resume(void)
{
tpacpi_disable_brightness_delay();

mutex_lock(&hotkey_mutex);
if (hotkey_status_set(true) < 0 ||
hotkey_mask_set(hotkey_acpi_mask) < 0)
pr_err("error while attempting to reset the event firmware interface\n");
mutex_unlock(&hotkey_mutex);

tpacpi_send_radiosw_update();
tpacpi_input_send_tabletsw();
Expand Down

0 comments on commit 81bf4a4

Please sign in to comment.