Commit 7cf95774 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Warn on disabling clocks with no users

Instead of BUG(), warn on disabling clocks with no users.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent c8d2eb8e
...@@ -134,9 +134,17 @@ void clk_disable(struct clk *clk) ...@@ -134,9 +134,17 @@ void clk_disable(struct clk *clk)
return; return;
spin_lock_irqsave(&clockfw_lock, flags); spin_lock_irqsave(&clockfw_lock, flags);
BUG_ON(clk->usecount == 0); if (clk->usecount == 0) {
printk(KERN_ERR "Trying disable clock %s with 0 usecount\n",
clk->name);
WARN_ON(1);
goto out;
}
if (arch_clock->clk_disable) if (arch_clock->clk_disable)
arch_clock->clk_disable(clk); arch_clock->clk_disable(clk);
out:
spin_unlock_irqrestore(&clockfw_lock, flags); spin_unlock_irqrestore(&clockfw_lock, flags);
} }
EXPORT_SYMBOL(clk_disable); EXPORT_SYMBOL(clk_disable);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment