]> www.infradead.org Git - users/dwmw2/linux.git/commit
platform/x86: thinkpad_acpi: Make tpacpi_driver_event() return if it handled the...
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Apr 2024 12:28:17 +0000 (14:28 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 29 Apr 2024 09:44:12 +0000 (11:44 +0200)
commit33dc2efda4e2ec48a77338c75b55325801492f09
tree3ac7d1a8816bef40e1360dbea63f67a951f4e450
parent9e5d6b982c5491a4590fa2d4b5494527c4527407
platform/x86: thinkpad_acpi: Make tpacpi_driver_event() return if it handled the event

tpacpi_driver_event() already only responds to hkey events which it knows
about. Make it return a bool and return true when it has handled the event.

This avoids the need to list TP_HKEY_EV_foo values to which it responds
both in its caller and in the function itself.

Instead callers can now call it unconditionally and check the return value.

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-8-hdegoede@redhat.com
drivers/platform/x86/thinkpad_acpi.c