From: Paul Cercueil Date: Sun, 21 Mar 2021 23:06:23 +0000 (-0700) Subject: Input: gpio-keys - remove extra call to input_sync X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=36a8fc6fa230eb936385884391cac80420cd0e6f;p=linux.git Input: gpio-keys - remove extra call to input_sync The input_sync() function is already called after the loop in gpio_keys_report_state(), so it does not need to be called after each iteration within gpio_keys_gpio_report_event(). Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20210307222240.380583-1-paul@crapouillou.net Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 77bac4ddf3248..7fcb2c35c5cc0 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -373,7 +373,6 @@ static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata) } else { input_event(input, type, *bdata->code, state); } - input_sync(input); } static void gpio_keys_gpio_work_func(struct work_struct *work) @@ -382,6 +381,7 @@ static void gpio_keys_gpio_work_func(struct work_struct *work) container_of(work, struct gpio_button_data, work.work); gpio_keys_gpio_report_event(bdata); + input_sync(bdata->input); if (bdata->button->wakeup) pm_relax(bdata->input->dev.parent);