[RAMEN9610-15071] [COMMON] drivers: battery: move full_check_cnt clear
authorKeunho Hwang <keunho.hwang@samsung.com>
Thu, 9 May 2019 09:14:36 +0000 (09:14 +0000)
committerKim Gunho <gunho.kim@samsung.com>
Fri, 28 Jun 2019 14:45:28 +0000 (23:45 +0900)
Change-Id: Iea758e2c8175311713ab7958949666a3618b1ca6
Signed-off-by: Keunho Hwang <keunho.hwang@samsung.com>
drivers/power/supply/s2mu00x_battery.c

index 2c953fedcb27af9b7d27c0a91a7855e52576f397..b1eb979f4e1708e39533d386befa71185c8b5cda 100644 (file)
@@ -415,9 +415,6 @@ static int set_charger_mode(
        struct power_supply *psy;
                int ret;
 
-       if (charger_mode != S2MU00X_BAT_CHG_MODE_CHARGING)
-               battery->full_check_cnt = 0;
-
        val.intval = charger_mode;
 
        psy = power_supply_get_by_name(battery->pdata->charger_name);
@@ -1582,6 +1579,7 @@ static void check_charging_full(
                        (battery->status == POWER_SUPPLY_STATUS_NOT_CHARGING)) {
                dev_dbg(battery->dev,
                                "%s: No Need to Check Full-Charged\n", __func__);
+               battery->full_check_cnt = 0;
                return;
        }