[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090128193525.2396.11744.stgit@localhost.localdomain>
Date: Wed, 28 Jan 2009 12:35:28 -0700
From: Paul Walmsley <paul@...an.com>
To: linux-arm-kernel@...ts.arm.linux.org.uk,
linux-kernel@...r.kernel.org
Cc: linux-omap@...r.kernel.org, Paul Walmsley <paul@...an.com>,
Tony Lindgren <tony@...mide.com>
Subject: [PATCH F 10/12] OMAP2/3 clock: omap2_clk_enable(): fix logic
Rearrange the parent clock enable status check code so it actually makes
sense. No functional change.
linux-omap source commit is 8f0680aff352906b81c49b0450172ffa690b03bb.
Signed-off-by: Paul Walmsley <paul@...an.com>
Signed-off-by: Tony Lindgren <tony@...mide.com>
---
arch/arm/mach-omap2/clock.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 5f17a2c..72e3db8 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -481,20 +481,23 @@ void omap2_clk_disable(struct clk *clk)
int omap2_clk_enable(struct clk *clk)
{
- int ret = 0;
+ int ret;
if (++clk->usecount > 1)
return 0;
omap2_clkdm_clk_enable(clk->clkdm.ptr, clk);
- if (clk->parent)
- ret = omap2_clk_enable(clk->parent);
+ if (clk->parent) {
+ int parent_ret;
- if (ret != 0) {
- clk->usecount--;
- omap2_clkdm_clk_disable(clk->clkdm.ptr, clk);
- return ret;
+ parent_ret = omap2_clk_enable(clk->parent);
+
+ if (parent_ret != 0) {
+ clk->usecount--;
+ omap2_clkdm_clk_disable(clk->clkdm.ptr, clk);
+ return parent_ret;
+ }
}
ret = _omap2_clk_enable(clk);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists