From patchwork Fri Feb 15 12:44:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14869 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id EDB5E23E2E for ; Fri, 15 Feb 2013 12:46:40 +0000 (UTC) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by fiordland.canonical.com (Postfix) with ESMTP id A6E85A18715 for ; Fri, 15 Feb 2013 12:46:40 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id fy7so2154320vcb.32 for ; Fri, 15 Feb 2013 04:46:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=3yCPp2E7R/K9V9Y2rSRHSl8zQUgH2or7CghxB9NQcK4=; b=UShKvtfDmSZJtpBU7S38l6A5dH+6ob8fqqyfzg5SezfFrGpmmXdhUsHppo0KN63Wxj B7laiaTTmJFz9kggkf7Qwxah2vcgL6Jj7nGjo+/o7qcq7hpeeFmPwaEU/E6yIzMcE0dA Rttu/luIq9MhhH+dKxY/pZi+9dqlqMR97WvrRDXOFhWf8DuYXCB503fYRZ75ZCnhwnIn YYCezR5b6Mnu+6e1UzHwi4C60jP1VZm8ze+NUBI6p8GYZBmajgBNFF9wlp+oRNF5tn4k tFagzWbJhx6Z6XKONBGy5Vs6mdryZdc84t1b1taNU0u5c9jgy6SA/zNCrzUm+24y51ds izeg== X-Received: by 10.52.33.167 with SMTP id s7mr2511318vdi.52.1360932399852; Fri, 15 Feb 2013 04:46:39 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.221.4.5 with SMTP id oa5csp10881vcb; Fri, 15 Feb 2013 04:46:36 -0800 (PST) X-Received: by 10.194.91.211 with SMTP id cg19mr3916848wjb.43.1360932396400; Fri, 15 Feb 2013 04:46:36 -0800 (PST) Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]) by mx.google.com with ESMTPS id d1si1026657wix.127.2013.02.15.04.46.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:46:36 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::234 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::234; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::234 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f180.google.com with SMTP id k14so2767301wer.25 for ; Fri, 15 Feb 2013 04:46:36 -0800 (PST) X-Received: by 10.194.108.229 with SMTP id hn5mr4087845wjb.8.1360932394864; Fri, 15 Feb 2013 04:46:34 -0800 (PST) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id bs6sm5133904wib.4.2013.02.15.04.46.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:46:34 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, cbouatmailru@gmail.com, sameo@linux.intel.com, Lee Jones Subject: [PATCH 24/40] abx500-chargalg: Prevent the watchdog from being kicked twice Date: Fri, 15 Feb 2013 12:44:54 +0000 Message-Id: <1360932310-30065-25-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360932310-30065-1-git-send-email-lee.jones@linaro.org> References: <1360932310-30065-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlDwPPDP8GGR9TmlTf6syUor3D80ayxemHnNtrw/F9VzgPqxklbxyOTsypWLjS56Obu+K8+ 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 --- drivers/power/abx500_chargalg.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index a9b8efd..e23b92a 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) 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); } /**