gpio-button-hotplug: use gpio_button_get_value() to fetch state.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37642 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
John Crispin 2013-08-01 14:31:24 +00:00
parent e2b775ac87
commit 3616f78676
1 changed files with 1 additions and 4 deletions

View File

@ -288,10 +288,7 @@ static void gpio_keys_polled_check_state(struct gpio_keys_button *button,
{ {
int state; int state;
if (bdata->can_sleep) state = gpio_button_get_value(button, bdata);
state = !!gpio_get_value_cansleep(button->gpio);
else
state = !!gpio_get_value(button->gpio);
state = !!(state ^ button->active_low); state = !!(state ^ button->active_low);
if (state != bdata->last_state) { if (state != bdata->last_state) {