summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-08-01 14:31:24 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-08-01 14:31:24 +0000
commit613957d8eb8f01b9aff2a4a0660031bedb026a28 (patch)
tree42c8e2a9372925b66f4892ea8e5c175f00c13a95 /package
parentc9d7d8b8550d5537dc7c8350ad8a96dff94337d1 (diff)
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
Diffstat (limited to 'package')
-rw-r--r--package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c5
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) {