net/can: use printk_ratelimited() instead of printk_ratelimit()
authorManuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Thu, 16 Jun 2011 02:08:01 +0000 (02:08 +0000)
committerDavid S. Miller <davem@conan.davemloft.net>
Fri, 17 Jun 2011 04:03:03 +0000 (00:03 -0400)
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().

Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
net/can/af_can.c

index 094fc5332d42c21cdd6150df6a57896480805faa..8ce926d3b2cb9e51f053a8a06c271eb50ee481ea 100644 (file)
@@ -58,6 +58,7 @@
 #include <linux/skbuff.h>
 #include <linux/can.h>
 #include <linux/can/core.h>
+#include <linux/ratelimit.h>
 #include <net/net_namespace.h>
 #include <net/sock.h>
 
@@ -161,8 +162,8 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
                 * return the error code immediately.  Below we will
                 * return -EPROTONOSUPPORT
                 */
-               if (err && printk_ratelimit())
-                       printk(KERN_ERR "can: request_module "
+               if (err)
+                       printk_ratelimited(KERN_ERR "can: request_module "
                               "(can-proto-%d) failed.\n", protocol);
 
                cp = can_get_proto(protocol);