From: Hans de Goede Date: Tue, 11 Jul 2017 11:41:34 +0000 (+0200) Subject: platform/x86: peaq-wmi: Fix peaq_ignore_events_counter handling off by 1 X-Git-Tag: v4.14-rc1~477^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1bda752fdaead0c154c13a72a83faabc7dffc82;p=platform%2Fkernel%2Flinux-rpi.git platform/x86: peaq-wmi: Fix peaq_ignore_events_counter handling off by 1 If peaq_ignore_events_counter gets set to 1 we should skip polling 1 time, rather then ignoring it. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) --- diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c index ca75b4dc..77d1f90 100644 --- a/drivers/platform/x86/peaq-wmi.c +++ b/drivers/platform/x86/peaq-wmi.c @@ -51,7 +51,7 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) return; } - if (peaq_ignore_events_counter && --peaq_ignore_events_counter > 0) + if (peaq_ignore_events_counter && --peaq_ignore_events_counter >= 0) return; if (obj.integer.value) {