diff mbox

[20/35] davinci: clock: Check CLK_PSC flag before disabling PSC

Message ID 1262802737-6601-21-git-send-email-khilman@deeprootsystems.com (mailing list archive)
State Accepted
Headers show

Commit Message

Kevin Hilman Jan. 6, 2010, 6:32 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index e46a643..f097f8d 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -49,7 +49,8 @@  static void __clk_disable(struct clk *clk)
 {
 	if (WARN_ON(atomic_read(&clk->usecount) == 0))
 		return;
-	if (atomic_dec_and_test(&clk->usecount) && !(clk->flags & CLK_PLL))
+	if (atomic_dec_and_test(&clk->usecount) && !(clk->flags & CLK_PLL)
+						&& (clk->flags & CLK_PSC))
 		davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, 0);
 	if (clk->parent)
 		__clk_disable(clk->parent);