aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2007-08-07 08:20:00 -0400
committerTony Lindgren <tony@atomide.com>2008-05-09 13:25:02 -0400
commit7cf95774190e423370945e116b07410c860407db (patch)
treec839f23fd52e53b59ed58118fbfbf9f9f2da503d
parentc8d2eb8e56b93c69a30793f19ac1bc784398fbd5 (diff)
ARM: OMAP: Warn on disabling clocks with no users
Instead of BUG(), warn on disabling clocks with no users. Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/plat-omap/clock.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 72d34a23a2ec..2946c193a7d6 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -134,9 +134,17 @@ void clk_disable(struct clk *clk)
134 return; 134 return;
135 135
136 spin_lock_irqsave(&clockfw_lock, flags); 136 spin_lock_irqsave(&clockfw_lock, flags);
137 BUG_ON(clk->usecount == 0); 137 if (clk->usecount == 0) {
138 printk(KERN_ERR "Trying disable clock %s with 0 usecount\n",
139 clk->name);
140 WARN_ON(1);
141 goto out;
142 }
143
138 if (arch_clock->clk_disable) 144 if (arch_clock->clk_disable)
139 arch_clock->clk_disable(clk); 145 arch_clock->clk_disable(clk);
146
147out:
140 spin_unlock_irqrestore(&clockfw_lock, flags); 148 spin_unlock_irqrestore(&clockfw_lock, flags);
141} 149}
142EXPORT_SYMBOL(clk_disable); 150EXPORT_SYMBOL(clk_disable);