summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2007-08-07 05:20:00 -0700
committerTony Lindgren <tony@atomide.com>2008-05-09 10:25:02 -0700
commit7cf95774190e423370945e116b07410c860407db (patch)
treec839f23fd52e53b59ed58118fbfbf9f9f2da503d /arch
parentc8d2eb8e56b93c69a30793f19ac1bc784398fbd5 (diff)
downloadop-kernel-dev-7cf95774190e423370945e116b07410c860407db.zip
op-kernel-dev-7cf95774190e423370945e116b07410c860407db.tar.gz
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>
Diffstat (limited to 'arch')
-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 72d34a2..2946c19 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)
return;
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)
arch_clock->clk_disable(clk);
+
+out:
spin_unlock_irqrestore(&clockfw_lock, flags);
}
EXPORT_SYMBOL(clk_disable);
OpenPOWER on IntegriCloud