@@ -2159,9 +2159,7 @@ static int ab8500_fg_get_property(struct power_supply *psy,
val->intval = di->bat_cap.prev_mah;
break;
case POWER_SUPPLY_PROP_CAPACITY:
- if (di->bat->capacity_scaling)
- val->intval = di->bat_cap.cap_scale.scaled_cap;
- else if (di->flags.batt_unknown && !di->bat->chg_unknown_bat &&
+ if (di->flags.batt_unknown && !di->bat->chg_unknown_bat &&
di->flags.batt_id_received)
val->intval = 100;
else
@@ -2625,7 +2623,7 @@ static ssize_t ab8500_show_capacity(struct device *dev,
if (di->bat->capacity_scaling)
capacity = di->bat_cap.cap_scale.scaled_cap;
else
- capacity = DIV_ROUND_CLOSEST(di->bat_cap.permille, 10);
+ capacity = di->bat_cap.prev_percent;
return scnprintf(buf, PAGE_SIZE, "%d\n", capacity);
}