From patchwork Wed Apr 3 08:45:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 15842 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 64E6923E21 for ; Wed, 3 Apr 2013 08:47:57 +0000 (UTC) Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by fiordland.canonical.com (Postfix) with ESMTP id E3744A184C4 for ; Wed, 3 Apr 2013 08:47:56 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id bs12sf2102230qab.5 for ; Wed, 03 Apr 2013 01:47:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=bcX38WjQRWcBPHjzspc3LOIfNE+w4148rROqCqn/9Y0=; b=LXmIP0bLFM54Y6YUDpapuOdusI3+k1HyjrFXmYzM9FqKnvIgYSqpNhI3aCxq7+XZ5F jv69Q4DlJE7giWtVa4/fvkHzeQRtcui2ufcEH+ABg2UlJG5/8fCrbpdd11xtBWouWlur pGjQgzMlHh2i3W/2C9yQppmkHSwH+TtF1S1p3w8X+cdzj/PUIVfSeTySHMtL1of2a+kq zAQ6FdqxnAVFqga0iIWGs/bNJCmeeCXZm0p486jmzTgu18JOkFvzGtnR8pfU+Shr2wZP LrGDjNtg1RGH0MlCZLacLcO8fFACPcNUx7eQDPZVJ4w853rhxe3P1YObGM15ri11KIst M9Ag== X-Received: by 10.224.157.1 with SMTP id z1mr696373qaw.8.1364978876483; Wed, 03 Apr 2013 01:47:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.163 with SMTP id z3ls826144qeb.5.gmail; Wed, 03 Apr 2013 01:47:56 -0700 (PDT) X-Received: by 10.58.56.161 with SMTP id b1mr493582veq.42.1364978876197; Wed, 03 Apr 2013 01:47:56 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id sx2si4255022vdc.97.2013.04.03.01.47.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 01:47:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id m1so1471994ves.41 for ; Wed, 03 Apr 2013 01:47:56 -0700 (PDT) X-Received: by 10.220.150.74 with SMTP id x10mr470814vcv.68.1364978876030; Wed, 03 Apr 2013 01:47:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp160648ved; Wed, 3 Apr 2013 01:47:55 -0700 (PDT) X-Received: by 10.14.4.69 with SMTP id 45mr1994997eei.0.1364978874997; Wed, 03 Apr 2013 01:47:54 -0700 (PDT) Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by mx.google.com with ESMTPS id n9si7602598eem.75.2013.04.03.01.47.54 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 01:47:54 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.44 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=74.125.83.44; Received: by mail-ee0-f44.google.com with SMTP id l10so588065eei.3 for ; Wed, 03 Apr 2013 01:47:54 -0700 (PDT) X-Received: by 10.14.219.129 with SMTP id m1mr1877859eep.16.1364978874396; Wed, 03 Apr 2013 01:47:54 -0700 (PDT) Received: from localhost ([2a01:2003:1:1e91:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id h5sm6928137eem.1.2013.04.03.01.47.47 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Apr 2013 01:47:53 -0700 (PDT) From: Fabio Baltieri To: Felipe Balbi Cc: Linus Walleij , Praveena Nadahally , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Mian Yousaf Kaukab , Fabio Baltieri Subject: [PATCH 08/12] usb: phy: ab8500-usb: fix unbalanced clock and regulator disable warnings Date: Wed, 3 Apr 2013 10:45:09 +0200 Message-Id: <1364978713-19612-9-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1364978713-19612-1-git-send-email-fabio.baltieri@linaro.org> References: <1364978713-19612-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQnSVGpxk3lxDkEEJrZVoQH4jnp0EsfgOhfrH/CI0XSyFrZnpnykXWd89B6WUbXYtvsmfBiz X-Original-Sender: fabio.baltieri@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mian Yousaf Kaukab To prevent clock and regulator frameworks from complaining, only disable the host or peripheral phy if they were enabled. Reported-by: Sakethram Bommisetti Signed-off-by: Mian Yousaf Kaukab Acked-by: Linus Walleij Signed-off-by: Fabio Baltieri --- drivers/usb/phy/phy-ab8500-usb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c index 803ad93..b7f6639 100644 --- a/drivers/usb/phy/phy-ab8500-usb.c +++ b/drivers/usb/phy/phy-ab8500-usb.c @@ -887,8 +887,10 @@ static int ab8500_usb_remove(struct platform_device *pdev) usb_remove_phy(&ab->phy); - ab8500_usb_host_phy_dis(ab); - ab8500_usb_peri_phy_dis(ab); + if (ab->mode == USB_HOST) + ab8500_usb_host_phy_dis(ab); + else if (ab->mode == USB_PERIPHERAL) + ab8500_usb_peri_phy_dis(ab); platform_set_drvdata(pdev, NULL);