Skip to content

Commit 59dddea

Browse files
jwrdegoedesre
authored andcommitted
power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule()
Use mod_delayed_work() instead of separate cancel_delayed_work_sync() + schedule_delayed_work() calls. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 59a99cd commit 59dddea

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/power/supply/bq27xxx_battery.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,10 +1083,8 @@ static int poll_interval_param_set(const char *val, const struct kernel_param *k
10831083
return ret;
10841084

10851085
mutex_lock(&bq27xxx_list_lock);
1086-
list_for_each_entry(di, &bq27xxx_battery_devices, list) {
1087-
cancel_delayed_work_sync(&di->work);
1088-
schedule_delayed_work(&di->work, 0);
1089-
}
1086+
list_for_each_entry(di, &bq27xxx_battery_devices, list)
1087+
mod_delayed_work(system_wq, &di->work, 0);
10901088
mutex_unlock(&bq27xxx_list_lock);
10911089

10921090
return ret;

0 commit comments

Comments
 (0)