diff options
-rw-r--r-- | drivers/power/bq27x00_battery.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index baae2151cb9a..b72ba7c1bd69 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c | |||
@@ -497,10 +497,11 @@ static void bq27x00_update(struct bq27x00_device_info *di) | |||
497 | di->charge_design_full = bq27x00_battery_read_ilmd(di); | 497 | di->charge_design_full = bq27x00_battery_read_ilmd(di); |
498 | } | 498 | } |
499 | 499 | ||
500 | if (memcmp(&di->cache, &cache, sizeof(cache)) != 0) { | 500 | if (di->cache.capacity != cache.capacity) |
501 | di->cache = cache; | ||
502 | power_supply_changed(&di->bat); | 501 | power_supply_changed(&di->bat); |
503 | } | 502 | |
503 | if (memcmp(&di->cache, &cache, sizeof(cache)) != 0) | ||
504 | di->cache = cache; | ||
504 | 505 | ||
505 | di->last_update = jiffies; | 506 | di->last_update = jiffies; |
506 | } | 507 | } |