diff options
Diffstat (limited to 'driver/battery/mm8013.c')
-rw-r--r-- | driver/battery/mm8013.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/battery/mm8013.c b/driver/battery/mm8013.c index 6013146be9..cd1a2a2083 100644 --- a/driver/battery/mm8013.c +++ b/driver/battery/mm8013.c @@ -212,12 +212,12 @@ void battery_get_params(struct batt_params *batt) if (battery_full_charge_capacity(&batt_new.full_capacity)) batt_new.flags |= BATT_FLAG_BAD_FULL_CAPACITY; - if (battery_flag(&flag) && (flag & MM8013_FLAG_CHG)) - batt_new.flags |= BATT_FLAG_WANT_CHARGE; - if (battery_status(&batt_new.status)) batt_new.flags |= BATT_FLAG_BAD_STATUS; + if (!battery_flag(&flag) && (flag & MM8013_FLAG_CHG)) + batt_new.flags |= BATT_FLAG_WANT_CHARGE; + batt_out: /* Update visible battery parameters */ memcpy(batt, &batt_new, sizeof(*batt)); |