mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 03:09:08 +08:00
gpio-button-hotplug: use gpio_button_get_value() to fetch state.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> SVN-Revision: 37642
This commit is contained in:
parent
2c19af6ac5
commit
ef96422920
@ -288,10 +288,7 @@ static void gpio_keys_polled_check_state(struct gpio_keys_button *button,
|
||||
{
|
||||
int state;
|
||||
|
||||
if (bdata->can_sleep)
|
||||
state = !!gpio_get_value_cansleep(button->gpio);
|
||||
else
|
||||
state = !!gpio_get_value(button->gpio);
|
||||
state = gpio_button_get_value(button, bdata);
|
||||
|
||||
state = !!(state ^ button->active_low);
|
||||
if (state != bdata->last_state) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user