platform/x86: thinkpad_acpi: Drop tpacpi_input_send_key_masked() and hotkey_driver_ev...
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Apr 2024 12:28:22 +0000 (14:28 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 29 Apr 2024 09:44:13 +0000 (11:44 +0200)
Both are only 1 / 2 lines and both only have 1 caller fold the contents
into tpacpi_hotkey_send_key() which is their single caller.

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

index 9f09434982185773ef07cddee6fcd9779d53263a..edae3b6020e440ae13cec3b78c5f0d9f36a34440 100644 (file)
@@ -1919,7 +1919,6 @@ static u32 hotkey_acpi_mask;              /* events enabled in firmware */
 static u16 *hotkey_keycode_map;
 
 static bool tpacpi_driver_event(const unsigned int hkey_event);
-static void hotkey_driver_event(const unsigned int scancode);
 static void hotkey_poll_setup(const bool may_warn);
 
 /* HKEY.MHKG() return bits */
@@ -2275,20 +2274,14 @@ static void tpacpi_input_send_key(const unsigned int scancode)
        }
 }
 
-/* Do NOT call without validating scancode first */
-static void tpacpi_input_send_key_masked(const unsigned int scancode)
-{
-       hotkey_driver_event(scancode);
-       tpacpi_input_send_key(scancode);
-}
-
 #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
 static struct tp_acpi_drv_struct ibm_hotkey_acpidriver;
 
 /* Do NOT call without validating scancode first */
 static void tpacpi_hotkey_send_key(unsigned int scancode)
 {
-       tpacpi_input_send_key_masked(scancode);
+       tpacpi_driver_event(TP_HKEY_EV_ORIG_KEY_START + scancode);
+       tpacpi_input_send_key(scancode);
 }
 
 static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m)
@@ -11168,11 +11161,6 @@ static bool tpacpi_driver_event(const unsigned int hkey_event)
        return false;
 }
 
-static void hotkey_driver_event(const unsigned int scancode)
-{
-       tpacpi_driver_event(TP_HKEY_EV_ORIG_KEY_START + scancode);
-}
-
 /* --------------------------------------------------------------------- */
 
 /* /proc support */