sh: simplify WARN usage in SH clock driver
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 4 May 2010 14:15:09 +0000 (14:15 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 13 May 2010 08:43:11 +0000 (17:43 +0900)
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/sh/clk.c

index c90a3e1e1085b582f49d2603aeccab22b9a018f5..5d84adac9ec499beebd50c303a5b0fb71f2cca5d 100644 (file)
@@ -160,12 +160,9 @@ void propagate_rate(struct clk *tclk)
 
 static void __clk_disable(struct clk *clk)
 {
-       if (clk->usecount == 0) {
-               printk(KERN_ERR "Trying disable clock %s with 0 usecount\n",
-                      clk->name);
-               WARN_ON(1);
+       if (WARN(!clk->usecount, "Trying to disable clock %s with 0 usecount\n",
+                clk->name))
                return;
-       }
 
        if (!(--clk->usecount)) {
                if (likely(clk->ops && clk->ops->disable))