Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5fea869 authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman
Browse files

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2381d728
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -877,10 +877,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;