diff mbox

platform/x86: peaq-wmi: Fix peaq_ignore_events_counter handling off by 1

Message ID 20170711114134.6706-1-hdegoede@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Darren Hart
Headers show

Commit Message

Hans de Goede July 11, 2017, 11:41 a.m. UTC
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 <hdegoede@redhat.com>
---
 drivers/platform/x86/peaq-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darren Hart July 11, 2017, 4:13 p.m. UTC | #1
On Tue, Jul 11, 2017 at 01:41:34PM +0200, Hans de Goede wrote:
> 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 <hdegoede@redhat.com>

Thanks Hans, queued to testing.
diff mbox

Patch

diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c
index 23942d5b3525..6e6a3e650e1b 100644
--- a/drivers/platform/x86/peaq-wmi.c
+++ b/drivers/platform/x86/peaq-wmi.c
@@ -50,7 +50,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) {