The valid flag is protected by the mutex, so code clearing it
should take the mutex before cleating the valid flag.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
dev_warn(info->dev, "Spurious Interrupt!!!\n");
}
+ mutex_lock(&info->lock);
info->valid = 0; /* Force updating of the cached registers */
+ mutex_unlock(&info->lock);
power_supply_changed(info->bat);
return IRQ_HANDLED;
{
struct axp288_fg_info *info = power_supply_get_drvdata(psy);
+ mutex_lock(&info->lock);
info->valid = 0; /* Force updating of the cached registers */
+ mutex_unlock(&info->lock);
power_supply_changed(info->bat);
}