power-supply: cw2015_battery: fix incorrect bracketing on a test
authorZhangbin Tong <zebulun.tong@rock-chips.com>
Tue, 29 Sep 2015 00:51:55 +0000 (08:51 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Tue, 29 Sep 2015 01:22:34 +0000 (09:22 +0800)
Change-Id: Id4910e148852ab64d9396b17d3daf403d1fcb4b2
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
drivers/power/cw2015_battery.c

index 2eca11cce96e2f7c37673217ae1a68663854e6e4..d2bdbd54f732e172f5652aec9b899b70af827efd 100755 (executable)
@@ -806,7 +806,7 @@ static int rk_usb_update_online(struct cw_battery *cw_bat)
 
        } else if (usb_status == 0 && cw_bat->usb_online != 0) {
                if (gpio_is_valid(gpio)) {
-                       if (gpio_get_value(gpio == value))
+                       if (gpio_get_value(gpio) == value)
                                gpio_direction_output(gpio, !value);
                }