diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-05-04 10:15:09 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-13 04:43:11 -0400 |
commit | f5ca6d4cbd49dbb6e179a71fa610eb321a3e9951 (patch) | |
tree | 18ce1080de03725319e01f6fe34da8bc35ef1961 /drivers/sh/clk.c | |
parent | 03c5ecd13cfe308a521e40e6dec6059314f3341b (diff) |
sh: simplify WARN usage in SH clock driver
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/sh/clk.c')
-rw-r--r-- | drivers/sh/clk.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/sh/clk.c b/drivers/sh/clk.c index c90a3e1e1085..5d84adac9ec4 100644 --- a/drivers/sh/clk.c +++ b/drivers/sh/clk.c | |||
@@ -160,12 +160,9 @@ void propagate_rate(struct clk *tclk) | |||
160 | 160 | ||
161 | static void __clk_disable(struct clk *clk) | 161 | static void __clk_disable(struct clk *clk) |
162 | { | 162 | { |
163 | if (clk->usecount == 0) { | 163 | if (WARN(!clk->usecount, "Trying to disable clock %s with 0 usecount\n", |
164 | printk(KERN_ERR "Trying disable clock %s with 0 usecount\n", | 164 | clk->name)) |
165 | clk->name); | ||
166 | WARN_ON(1); | ||
167 | return; | 165 | return; |
168 | } | ||
169 | 166 | ||
170 | if (!(--clk->usecount)) { | 167 | if (!(--clk->usecount)) { |
171 | if (likely(clk->ops && clk->ops->disable)) | 168 | if (likely(clk->ops && clk->ops->disable)) |