mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
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 <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com> Link: https://lore.kernel.org/r/20241221161124.114989-1-absicsz@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
74e3f62085
commit
f6945d52ee
|
|
@ -842,7 +842,7 @@ static int bq2415x_notifier_call(struct notifier_block *nb,
|
|||
if (bq->automode < 1)
|
||||
return NOTIFY_OK;
|
||||
|
||||
schedule_delayed_work(&bq->work, 0);
|
||||
mod_delayed_work(system_wq, &bq->work, 0);
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user