diff options
author | Hans de Goede | 2023-04-15 20:23:39 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-06-21 16:00:52 +0200 |
commit | 398bf0d67bcccac84efc45d413b9bd57f27af0fd (patch) | |
tree | baac246dfa9861d2e9e433142e1d5e6e25ce45d1 | |
parent | 66a88d04cf5d3a019c520effdad8146e8b855a64 (diff) |
power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule()
[ Upstream commit 59dddea9879713423c7b2ade43c423bb71e0d216 ]
Use mod_delayed_work() instead of separate cancel_delayed_work_sync() +
schedule_delayed_work() calls.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/power/supply/bq27xxx_battery.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c index 17a09d103a59..4a5371a3a531 100644 --- a/drivers/power/supply/bq27xxx_battery.c +++ b/drivers/power/supply/bq27xxx_battery.c @@ -1083,10 +1083,8 @@ static int poll_interval_param_set(const char *val, const struct kernel_param *k return ret; mutex_lock(&bq27xxx_list_lock); - list_for_each_entry(di, &bq27xxx_battery_devices, list) { - cancel_delayed_work_sync(&di->work); - schedule_delayed_work(&di->work, 0); - } + list_for_each_entry(di, &bq27xxx_battery_devices, list) + mod_delayed_work(system_wq, &di->work, 0); mutex_unlock(&bq27xxx_list_lock); return ret; |