Commit a28c7e93 authored by Michał Kępień's avatar Michał Kępień Committed by Darren Hart

platform/x86: fujitsu-laptop: make hotkey handling functions more similar

Make two minor tweaks to acpi_fujitsu_hotkey_press() to make it more
similar to acpi_fujitsu_hotkey_release():

  * call vdbg_printk() after reporting the input event,
  * return immediately when kfifo_in_locked() fails.
Signed-off-by: default avatarMichał Kępień <kernel@kempniu.pl>
Acked-by: default avatarJonathan Woithe <jwoithe@just42.net>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
parent 29544f03
...@@ -1040,18 +1040,18 @@ static void acpi_fujitsu_hotkey_press(int keycode) ...@@ -1040,18 +1040,18 @@ static void acpi_fujitsu_hotkey_press(int keycode)
struct input_dev *input = fujitsu_hotkey->input; struct input_dev *input = fujitsu_hotkey->input;
int status; int status;
vdbg_printk(FUJLAPTOP_DBG_TRACE,
"Push keycode into ringbuffer [%d]\n", keycode);
status = kfifo_in_locked(&fujitsu_hotkey->fifo, status = kfifo_in_locked(&fujitsu_hotkey->fifo,
(unsigned char *)&keycode, sizeof(keycode), (unsigned char *)&keycode, sizeof(keycode),
&fujitsu_hotkey->fifo_lock); &fujitsu_hotkey->fifo_lock);
if (status != sizeof(keycode)) { if (status != sizeof(keycode)) {
vdbg_printk(FUJLAPTOP_DBG_WARN, vdbg_printk(FUJLAPTOP_DBG_WARN,
"Could not push keycode [0x%x]\n", keycode); "Could not push keycode [0x%x]\n", keycode);
} else { return;
input_report_key(input, keycode, 1);
input_sync(input);
} }
input_report_key(input, keycode, 1);
input_sync(input);
vdbg_printk(FUJLAPTOP_DBG_TRACE,
"Push keycode into ringbuffer [%d]\n", keycode);
} }
static void acpi_fujitsu_hotkey_release(void) static void acpi_fujitsu_hotkey_release(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment