Skip to content

Commit f6945d5

Browse files
sicelosre
authored andcommitted
power: supply: bq2415x_charger: Immediately reschedule delayed work on notifier events
When the notifier is called we want to schedule the worker as soon as possible. Thus it makes sense to reschedule any waiting work and only queue a new one if there is none. Suggested-by: Ivaylo Dimitrov <[email protected]> Signed-off-by: Sicelo A. Mhlongo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 74e3f62 commit f6945d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/power/supply/bq2415x_charger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ static int bq2415x_notifier_call(struct notifier_block *nb,
842842
if (bq->automode < 1)
843843
return NOTIFY_OK;
844844

845-
schedule_delayed_work(&bq->work, 0);
845+
mod_delayed_work(system_wq, &bq->work, 0);
846846

847847
return NOTIFY_OK;
848848
}

0 commit comments

Comments
 (0)