Skip to contentSkip to conversation

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

PATCH In review Hans de Goede 2 participants 2 messages Jul 11, 2017 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/platform/x86/peaq-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/peaq-wmi.c +1 -1
index 23942d5b3525..6e6a3e650e1b 100644
@@ -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) {
Signature · 1 line
2.13.0
#1 lore raw
Quoted 4 lines · Hans de Goede

If peaq_ignore_events_counter gets set to 1 we should skip polling 1 time, rather then ignoring it.

Thanks Hans, queued to testing.

Signature · 2 lines
Darren Hart
VMware Open Source Technology Center