thinkpad_acpi: Always report scancodes for hotkeys

Some thinkpad hotkeys report key codes like KEY_FN_F8 when something
like KEY_VOLUMEDOWN is desired. Always provide the scan codes in
addition to the key codes to assist with debugging these issues. Also
send the scan code before the key code to match what other drivers do,
as some userspace utilities expect this ordering.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

authored by Seth Forshee and committed by Matthew Garrett 5ffba7e6 bbb70607

+2 -6
+2 -6
drivers/platform/x86/thinkpad_acpi.c
··· 2275 if (keycode != KEY_RESERVED) { 2276 mutex_lock(&tpacpi_inputdev_send_mutex); 2277 2278 input_report_key(tpacpi_inputdev, keycode, 1); 2279 - if (keycode == KEY_UNKNOWN) 2280 - input_event(tpacpi_inputdev, EV_MSC, MSC_SCAN, 2281 - scancode); 2282 input_sync(tpacpi_inputdev); 2283 2284 input_report_key(tpacpi_inputdev, keycode, 0); 2285 - if (keycode == KEY_UNKNOWN) 2286 - input_event(tpacpi_inputdev, EV_MSC, MSC_SCAN, 2287 - scancode); 2288 input_sync(tpacpi_inputdev); 2289 2290 mutex_unlock(&tpacpi_inputdev_send_mutex);
··· 2275 if (keycode != KEY_RESERVED) { 2276 mutex_lock(&tpacpi_inputdev_send_mutex); 2277 2278 + input_event(tpacpi_inputdev, EV_MSC, MSC_SCAN, scancode); 2279 input_report_key(tpacpi_inputdev, keycode, 1); 2280 input_sync(tpacpi_inputdev); 2281 2282 + input_event(tpacpi_inputdev, EV_MSC, MSC_SCAN, scancode); 2283 input_report_key(tpacpi_inputdev, keycode, 0); 2284 input_sync(tpacpi_inputdev); 2285 2286 mutex_unlock(&tpacpi_inputdev_send_mutex);