mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule()
[ Upstream commit 59dddea987 ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ce2b5f24ca
commit
b2856c3cd3
@@ -1018,10 +1018,8 @@ static int poll_interval_param_set(const char *val, const struct kernel_param *k
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
mutex_lock(&bq27xxx_list_lock);
|
mutex_lock(&bq27xxx_list_lock);
|
||||||
list_for_each_entry(di, &bq27xxx_battery_devices, list) {
|
list_for_each_entry(di, &bq27xxx_battery_devices, list)
|
||||||
cancel_delayed_work_sync(&di->work);
|
mod_delayed_work(system_wq, &di->work, 0);
|
||||||
schedule_delayed_work(&di->work, 0);
|
|
||||||
}
|
|
||||||
mutex_unlock(&bq27xxx_list_lock);
|
mutex_unlock(&bq27xxx_list_lock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user