diff options
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 11 |
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 | |||
148 | out: | ||
140 | spin_unlock_irqrestore(&clockfw_lock, flags); | 149 | spin_unlock_irqrestore(&clockfw_lock, flags); |
141 | } | 150 | } |
142 | EXPORT_SYMBOL(clk_disable); | 151 | EXPORT_SYMBOL(clk_disable); |