diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-02-13 08:38:00 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-03-06 23:35:49 -0500 |
commit | eaded808c9f9f36d95b5b7fe195ab1839e9e486c (patch) | |
tree | eaa1cc3ebb1fb372ac8c45520eb231da606399a8 /drivers/power/abx500_chargalg.c | |
parent | 88efdb8022f13c198fe4459e6e278f9b559cff3b (diff) |
abx500-chargalg: Prevent the watchdog from being kicked twice
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>
Diffstat (limited to 'drivers/power/abx500_chargalg.c')
-rw-r--r-- | drivers/power/abx500_chargalg.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index a9b8efdafb8f..e23b92a5332e 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c | |||
@@ -689,8 +689,6 @@ static void abx500_chargalg_hold_charging(struct abx500_chargalg *di) | |||
689 | static void abx500_chargalg_start_charging(struct abx500_chargalg *di, | 689 | static void abx500_chargalg_start_charging(struct abx500_chargalg *di, |
690 | int vset, int iset) | 690 | int vset, int iset) |
691 | { | 691 | { |
692 | bool start_chargalg_wd = true; | ||
693 | |||
694 | switch (di->chg_info.charger_type) { | 692 | switch (di->chg_info.charger_type) { |
695 | case AC_CHG: | 693 | case AC_CHG: |
696 | dev_dbg(di->dev, | 694 | dev_dbg(di->dev, |
@@ -708,12 +706,8 @@ static void abx500_chargalg_start_charging(struct abx500_chargalg *di, | |||
708 | 706 | ||
709 | default: | 707 | default: |
710 | dev_err(di->dev, "Unknown charger to charge from\n"); | 708 | dev_err(di->dev, "Unknown charger to charge from\n"); |
711 | start_chargalg_wd = false; | ||
712 | break; | 709 | break; |
713 | } | 710 | } |
714 | |||
715 | if (start_chargalg_wd && !delayed_work_pending(&di->chargalg_wd_work)) | ||
716 | queue_delayed_work(di->chargalg_wq, &di->chargalg_wd_work, 0); | ||
717 | } | 711 | } |
718 | 712 | ||
719 | /** | 713 | /** |