From patchwork Wed Jun 20 08:42:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9468 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 16DD623E5A for ; Wed, 20 Jun 2012 08:42:33 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id D6AB1A187E2 for ; Wed, 20 Jun 2012 08:42:32 +0000 (UTC) Received: by yenq6 with SMTP id q6so6004583yen.11 for ; Wed, 20 Jun 2012 01:42:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=DyFA2kLij57eTYrQgITEo7dY8yX4wdepyocELyC8ai0=; b=eNFpRCAdN5W9ohUIGJKcPh+HAj/s9qEUqSWi1PpUFamHWacEyGuAXBUUxIOchMdEBr BZZobU+TCEuObdxW6enHPSKMqnslcKufsUE3IQtp4zEQz78Wo5pKnUeBNR9vt9WRpbGr FRJwTH9t+lOP7wZ6nW6BciDAa51fC1t3TzoE1ISeZhj6l3Gmf1ibkNxF9Tg22pJ9TOdQ gGGSIlR1ndgNI4oxqTMZ4SlpqITAsc95k21lSKl8nX6gU6ac1eXbN5oGaqbE1QK88CyQ l4cnxbCbICBorLdphR8Qvza3Ezi8YvjKyqTALDTl362OYhO+6EzX0wgTYLtRT80ZnvVu 2BcA== Received: by 10.50.193.196 with SMTP id hq4mr3674880igc.57.1340181752186; Wed, 20 Jun 2012 01:42:32 -0700 (PDT) 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.231.24.148 with SMTP id v20csp168519ibb; Wed, 20 Jun 2012 01:42:31 -0700 (PDT) Received: by 10.14.48.65 with SMTP id u41mr3774731eeb.169.1340181750636; Wed, 20 Jun 2012 01:42:30 -0700 (PDT) Received: from eu1sys200aog107.obsmtp.com (eu1sys200aog107.obsmtp.com. [207.126.144.123]) by mx.google.com with SMTP id d5si11505307eeb.130.2012.06.20.01.42.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jun 2012 01:42:30 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.123; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.123 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKT+GM7bxsMncSHcTdllQq1gFhOglJ9mfY@postini.com; Wed, 20 Jun 2012 08:42:30 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 939ACB5; Wed, 20 Jun 2012 08:33:58 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id D7690C3A; Wed, 20 Jun 2012 08:42:17 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id BB9D2A807B; Wed, 20 Jun 2012 10:42:12 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 20 Jun 2012 10:42:16 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Linus Walleij , Pankaj Jangra Subject: [PATCH v2] pinctrl/coh901: use clk_prepare_[en|dis]able() Date: Wed, 20 Jun 2012 10:42:12 +0200 Message-ID: <1340181732-21953-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQk56SfyPP4aboGp3U2uGtdyC2PEVBOG2UnfvvG+yVfVGcWQAW2EoRlNoh2FqiSExbXYgO3m From: Linus Walleij The COH901 GPIO driver did not prepare or unprepare its clock, so let us fix it to do so. Cc: Pankaj Jangra Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Fix up to use clk_disable_unprepare() on error and exit paths, noticed by Pankaj Jangra. --- drivers/pinctrl/pinctrl-coh901.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index 55697a5..cc0f00d 100644 --- a/drivers/pinctrl/pinctrl-coh901.c +++ b/drivers/pinctrl/pinctrl-coh901.c @@ -770,7 +770,7 @@ static int __init u300_gpio_probe(struct platform_device *pdev) dev_err(gpio->dev, "could not get GPIO clock\n"); goto err_no_clk; } - err = clk_enable(gpio->clk); + err = clk_prepare_enable(gpio->clk); if (err) { dev_err(gpio->dev, "could not enable GPIO clock\n"); goto err_no_clk_enable; @@ -912,7 +912,7 @@ err_no_ioremap: release_mem_region(gpio->memres->start, resource_size(gpio->memres)); err_no_ioregion: err_no_resource: - clk_disable(gpio->clk); + clk_disable_unprepare(gpio->clk); err_no_clk_enable: clk_put(gpio->clk); err_no_clk: @@ -943,7 +943,7 @@ static int __exit u300_gpio_remove(struct platform_device *pdev) iounmap(gpio->base); release_mem_region(gpio->memres->start, resource_size(gpio->memres)); - clk_disable(gpio->clk); + clk_disable_unprepare(gpio->clk); clk_put(gpio->clk); platform_set_drvdata(pdev, NULL); kfree(gpio);