Skip to content

Commit

Permalink
abx500-chargalg: Prevent the watchdog from being kicked twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lee Jones committed Mar 7, 2013
1 parent 88efdb8 commit eaded80
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/power/abx500_chargalg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit eaded80

Please sign in to comment.