diff options
author | John Crispin <john@openwrt.org> | 2013-08-01 14:31:24 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-08-01 14:31:24 +0000 |
commit | ef964229202bd9afdf8aaa7bc60bba1d8e401531 (patch) | |
tree | 2720a78d8514ed138872775e8998161d85989eb2 | |
parent | 2c19af6ac53d1bcc3db10eab99153d35c598e655 (diff) | |
download | upstream-ef964229202bd9afdf8aaa7bc60bba1d8e401531.tar.gz upstream-ef964229202bd9afdf8aaa7bc60bba1d8e401531.tar.bz2 upstream-ef964229202bd9afdf8aaa7bc60bba1d8e401531.zip |
gpio-button-hotplug: use gpio_button_get_value() to fetch state.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
SVN-Revision: 37642
-rw-r--r-- | package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c index 7fe169067d..9cbee21e0a 100644 --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c @@ -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) { |