From: Alban Bedel <albeu@free.fr>
To: linux-spi@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Ralf Baechle <ralf@linux-mips.org>,
Mark Brown <broonie@kernel.org>, Alban Bedel <albeu@free.fr>,
Gabor Juhos <juhosg@openwrt.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mips@linux-mips.org
Subject: [PATCH 3/4] spi: spi-ath79: Use clk_prepare_enable and clk_disable_unprepare
Date: Fri, 24 Apr 2015 16:19:23 +0200 [thread overview]
Message-ID: <1429885164-28501-4-git-send-email-albeu@free.fr> (raw)
In-Reply-To: <1429885164-28501-1-git-send-email-albeu@free.fr>
Clocks should be prepared and unprepared, fix this by using
clk_prepare_enable() and clk_disable_unprepare() instead of
clk_enable() and clk_disable().
Signed-off-by: Alban Bedel <albeu@free.fr>
---
drivers/spi/spi-ath79.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c
index 239bc31..b37bedd 100644
--- a/drivers/spi/spi-ath79.c
+++ b/drivers/spi/spi-ath79.c
@@ -249,7 +249,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
goto err_put_master;
}
- ret = clk_enable(sp->clk);
+ ret = clk_prepare_enable(sp->clk);
if (ret)
goto err_put_master;
@@ -273,7 +273,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
err_disable:
ath79_spi_disable(sp);
err_clk_disable:
- clk_disable(sp->clk);
+ clk_disable_unprepare(sp->clk);
err_put_master:
spi_master_put(sp->bitbang.master);
@@ -286,7 +286,7 @@ static int ath79_spi_remove(struct platform_device *pdev)
spi_bitbang_stop(&sp->bitbang);
ath79_spi_disable(sp);
- clk_disable(sp->clk);
+ clk_disable_unprepare(sp->clk);
spi_master_put(sp->bitbang.master);
return 0;
--
2.0.0
next prev parent reply other threads:[~2015-04-24 14:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 14:19 [PATCH 0/4] spi: spi-ath79: Devicetree support and misc fixes Alban Bedel
2015-04-24 14:19 ` [PATCH 1/4] devicetree: add binding documentation for the AR7100 SPI controller Alban Bedel
[not found] ` <1429885164-28501-2-git-send-email-albeu-GANU6spQydw@public.gmane.org>
2015-04-24 17:37 ` Sergei Shtylyov
[not found] ` <553A7F62.80108-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2015-05-07 21:18 ` [PATCH] devicetree: Misc fix for the AR7100 SPI controller binding Alban Bedel
2015-04-24 14:19 ` Alban Bedel [this message]
2015-04-24 14:19 ` [PATCH 4/4] spi: spi-ath79: Set the initial state of CS0 Alban Bedel
[not found] ` <1429885164-28501-1-git-send-email-albeu-GANU6spQydw@public.gmane.org>
2015-04-24 14:19 ` [PATCH 2/4] spi: spi-ath79: Add device tree support Alban Bedel
2015-04-24 17:58 ` [PATCH 0/4] spi: spi-ath79: Devicetree support and misc fixes Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429885164-28501-4-git-send-email-albeu@free.fr \
--to=albeu@free.fr \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=juhosg@openwrt.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-spi@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=ralf@linux-mips.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).