]> git.karo-electronics.de Git - linux-beck.git/commitdiff
abx500-chargalg: Prevent the watchdog from being kicked twice
authorLee Jones <lee.jones@linaro.org>
Wed, 13 Feb 2013 13:38:00 +0000 (13:38 +0000)
committerLee Jones <lee.jones@linaro.org>
Thu, 7 Mar 2013 04:35:49 +0000 (12:35 +0800)
Charging watchdog kicker work-thread gets started twice causing
'failed to kick watchdog' message after removing charger and
when re-inserting charger. This patch removes the superfluous
start of watchdog kicker-thread.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/power/abx500_chargalg.c

index a9b8efdafb8f8ae81de0769bae2fcfc724c60667..e23b92a5332e1f72ed78a1490e8348dc8e653f19 100644 (file)
@@ -689,8 +689,6 @@ static void abx500_chargalg_hold_charging(struct abx500_chargalg *di)
 static void abx500_chargalg_start_charging(struct abx500_chargalg *di,
        int vset, int iset)
 {
-       bool start_chargalg_wd = true;
-
        switch (di->chg_info.charger_type) {
        case AC_CHG:
                dev_dbg(di->dev,
@@ -708,12 +706,8 @@ static void abx500_chargalg_start_charging(struct abx500_chargalg *di,
 
        default:
                dev_err(di->dev, "Unknown charger to charge from\n");
-               start_chargalg_wd = false;
                break;
        }
-
-       if (start_chargalg_wd && !delayed_work_pending(&di->chargalg_wd_work))
-               queue_delayed_work(di->chargalg_wq, &di->chargalg_wd_work, 0);
 }
 
 /**