]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Warn on disabling clocks with no users
authorTony Lindgren <tony@atomide.com>
Tue, 7 Aug 2007 12:20:00 +0000 (05:20 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 9 May 2008 17:25:02 +0000 (10:25 -0700)
Instead of BUG(), warn on disabling clocks with no users.

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/clock.c

index 72d34a23a2ec6276073af8906e916075b6808945..2946c193a7d63195806e431bc63d5b5db281a919 100644 (file)
@@ -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);