power: gpio-charger: do not use gpio value directly
authorHeiko Stuebner <heiko.stuebner@bq.com>
Tue, 23 Sep 2014 20:42:16 +0000 (22:42 +0200)
committerSebastian Reichel <sre@kernel.org>
Wed, 24 Sep 2014 23:45:59 +0000 (01:45 +0200)
commit4d96fb1ec81118c6406fe6d3670f172b2faaedf3
tree3bb8e9af8313f7cc298a9b3da66dc03fd1ece568
parentddd26dff757d08d4eb309a28bf2a02372387e71f
power: gpio-charger: do not use gpio value directly

Some gpio implementations return interesting values for gpio_get_value when
the value is not 0 - as seen on a imx6sl board. Therefore do not use the
value returned from gpio_get_value directly but simply check for 0 or not 0.

Signed-off-by: Heiko Stuebner <heiko.stuebner@bq.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/gpio-charger.c