summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorMichał Kępień <kernel@kempniu.pl>2017-01-11 09:59:33 +0100
committerDarren Hart <dvhart@linux.intel.com>2017-02-04 02:47:19 +0100
commita28c7e93bf26f16948065dbbf4cbe3c457386f41 (patch)
tree5441af6e907caa6e541a5c0f489f5b7334c8d464 /drivers/platform
parent29544f03e52b2a6670ae1f1331033feefa216536 (diff)
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: Michał Kępień <kernel@kempniu.pl> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 1e54dddf51de..2b218b1d13e5 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -1040,18 +1040,18 @@ static void acpi_fujitsu_hotkey_press(int keycode)
struct input_dev *input = fujitsu_hotkey->input;
int status;
- vdbg_printk(FUJLAPTOP_DBG_TRACE,
- "Push keycode into ringbuffer [%d]\n", keycode);
status = kfifo_in_locked(&fujitsu_hotkey->fifo,
(unsigned char *)&keycode, sizeof(keycode),
&fujitsu_hotkey->fifo_lock);
if (status != sizeof(keycode)) {
vdbg_printk(FUJLAPTOP_DBG_WARN,
"Could not push keycode [0x%x]\n", keycode);
- } else {
- input_report_key(input, keycode, 1);
- input_sync(input);
+ return;
}
+ 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)