projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a5fe23
)
[AVR32] Warn, don't BUG if clk_disable is called too many times
author
Haavard Skinnemoen
<hskinnemoen@atmel.com>
Fri, 16 Feb 2007 12:19:47 +0000
(13:19 +0100)
committer
Haavard Skinnemoen
<hskinnemoen@atmel.com>
Fri, 16 Feb 2007 12:19:47 +0000
(13:19 +0100)
Print a helpful warning along with a stack dump if clk_disable is
called on a already-disabled clock. Remove the BUG_ON().
Extracted from a patch by David Brownell.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
arch/avr32/mach-at32ap/clock.c
patch
|
blob
|
history
diff --git
a/arch/avr32/mach-at32ap/clock.c
b/arch/avr32/mach-at32ap/clock.c
index 3d0d1097389f167ec48dca953e277f7b331ab5fa..49e7b12fe710848dfa1b4fa18f12978768efa481 100644
(file)
--- a/
arch/avr32/mach-at32ap/clock.c
+++ b/
arch/avr32/mach-at32ap/clock.c
@@
-63,7
+63,11
@@
EXPORT_SYMBOL(clk_enable);
static void __clk_disable(struct clk *clk)
{
- BUG_ON(clk->users == 0);
+ if (clk->users == 0) {
+ printk(KERN_ERR "%s: mismatched disable\n", clk->name);
+ WARN_ON(1);
+ return;
+ }
if (--clk->users == 0 && clk->mode)
clk->mode(clk, 0);