zenxfi3: fix horrible bug which prevented the power button to work

Change-Id: Ic8e86762f84ca41e931801c1aee08007129eef20
This commit is contained in:
Amaury Pouly 2014-03-22 16:03:12 +01:00
parent 202717d18f
commit 5abe98dada

View file

@ -160,9 +160,10 @@ int button_read_device(void)
power_ignore_counter = HZ; power_ignore_counter = HZ;
} }
int res = imx233_button_read(touchpad_btns); int res = imx233_button_read(touchpad_btns);
if(power_ignore_counter >= 0) if(power_ignore_counter > 0)
res &= ~BUTTON_POWER; {
else
power_ignore_counter--; power_ignore_counter--;
res &= ~BUTTON_POWER;
}
return res; return res;
} }