gpio-button-hotplug: use gpio_button_get_value() to initialize last_state.
authorJohn Crispin <john@openwrt.org>
Thu, 1 Aug 2013 14:31:28 +0000 (14:31 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 1 Aug 2013 14:31:28 +0000 (14:31 +0000)
commitd13e65024dd7d634a66f625b598fea842f64a98d
treebf79add640f14f7caec26d9eb8382f45689e1777
parent6ee88abcb923702b66b9e605eeb05479e436bbc7
gpio-button-hotplug: use gpio_button_get_value() to initialize last_state.

TL-WR720N-v3 has a slider switch composed of 2 GPIO buttons which can be
used to swtich between 3 positions.  At leat 1 button is in pressed state
in any of those positions.  Initialize 'last_state' as 0 (released) will
cause the device to automatically enter failsafe mode on every bootup.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
SVN-Revision: 37643
package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c