aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/clock.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-07-11 09:36:25 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-07-11 09:36:25 -0400
commita8931ef380c92d121ae74ecfb03b2d63f72eea6f (patch)
tree980fb6b019e11e6cb1ece55b7faff184721a8053 /arch/arm/plat-omap/clock.c
parent90574d0a4d4b73308ae54a2a57a4f3f1fa98e984 (diff)
parente5a5816f7875207cb0a0a7032e39a4686c5e10a4 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r--arch/arm/plat-omap/clock.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 72d34a23a2ec..2db5580048d8 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -21,6 +21,7 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/mutex.h> 22#include <linux/mutex.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/cpufreq.h>
24 25
25#include <asm/io.h> 26#include <asm/io.h>
26 27
@@ -134,9 +135,17 @@ void clk_disable(struct clk *clk)
134 return; 135 return;
135 136
136 spin_lock_irqsave(&clockfw_lock, flags); 137 spin_lock_irqsave(&clockfw_lock, flags);
137 BUG_ON(clk->usecount == 0); 138 if (clk->usecount == 0) {
139 printk(KERN_ERR "Trying disable clock %s with 0 usecount\n",
140 clk->name);
141 WARN_ON(1);
142 goto out;
143 }
144
138 if (arch_clock->clk_disable) 145 if (arch_clock->clk_disable)
139 arch_clock->clk_disable(clk); 146 arch_clock->clk_disable(clk);
147
148out:
140 spin_unlock_irqrestore(&clockfw_lock, flags); 149 spin_unlock_irqrestore(&clockfw_lock, flags);
141} 150}
142EXPORT_SYMBOL(clk_disable); 151EXPORT_SYMBOL(clk_disable);