Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Hans de Goede and committed by
Sebastian Reichel
59dddea9 59a99cd4

+2 -4
+2 -4
drivers/power/supply/bq27xxx_battery.c
··· 1083 1083 return ret; 1084 1084 1085 1085 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); 1090 1088 mutex_unlock(&bq27xxx_list_lock); 1091 1089 1092 1090 return ret;