:: [maemo-leste] [PATCH 1/2] power: su…
Top Page
Delete this message
Reply to this message
Author: Sicelo A. Mhlongo
Date:  
To: linux-pm
CC: pali, sre, linux-kernel, maemo-leste, Sicelo A. Mhlongo, Ivaylo Dimitrov
New-Topics: [maemo-leste] [PATCH 2/2] power: supply: bq2415x_charger: report charging state changes to userspace, Re: [maemo-leste] (subset) [PATCH 1/2] power: supply: bq2415x_charger: Immediately queue delayed work on supply change events
Subject: [maemo-leste] [PATCH 1/2] power: supply: bq2415x_charger: Immediately queue delayed work on supply change events
bq2415x_notifier_call is called asynchronously, when a change is notified
from the external notify device. Therefore, reschedule the work item to
run as soon as possible thereafter.

Suggested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@???>
Signed-off-by: Sicelo A. Mhlongo <absicsz@???>
---
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 25e28dac900d..1a02195769a3 100644
--- a/drivers/power/supply/bq2415x_charger.c
+++ b/drivers/power/supply/bq2415x_charger.c
@@ -839,7 +839,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