[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241221161124.114989-1-absicsz@gmail.com>
Date: Sat, 21 Dec 2024 18:10:23 +0200
From: "Sicelo A. Mhlongo" <absicsz@...il.com>
To: linux-pm@...r.kernel.org
Cc: Sebastian Reichel <sebastian.reichel@...labora.com>,
pali@...nel.org,
linux-kernel@...r.kernel.org,
Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
"Sicelo A. Mhlongo" <absicsz@...il.com>
Subject: [PATCH v2] 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@...il.com>
Signed-off-by: Sicelo A. Mhlongo <absicsz@...il.com>
---
* Changes from v1:
- Reworded the commit description per comments from v1 review
drivers/power/supply/bq2415x_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/bq2415x_charger.c b/drivers/power/supply/bq2415x_charger.c
index 18a6c3dbc758..22f6a3b71632 100644
--- a/drivers/power/supply/bq2415x_charger.c
+++ b/drivers/power/supply/bq2415x_charger.c
@@ -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;
}
--
2.45.2
Powered by blists - more mailing lists