net/can: use printk_ratelimited() instead of printk_ratelimit()

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>
This commit is contained in:
Manuel Zerpies 2011-06-16 02:08:01 +00:00 committed by David S. Miller
parent c63d6ea306
commit d751e62396
1 changed files with 3 additions and 2 deletions

View File

@ -58,6 +58,7 @@
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/can.h> #include <linux/can.h>
#include <linux/can/core.h> #include <linux/can/core.h>
#include <linux/ratelimit.h>
#include <net/net_namespace.h> #include <net/net_namespace.h>
#include <net/sock.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 the error code immediately. Below we will
* return -EPROTONOSUPPORT * return -EPROTONOSUPPORT
*/ */
if (err && printk_ratelimit()) if (err)
printk(KERN_ERR "can: request_module " printk_ratelimited(KERN_ERR "can: request_module "
"(can-proto-%d) failed.\n", protocol); "(can-proto-%d) failed.\n", protocol);
cp = can_get_proto(protocol); cp = can_get_proto(protocol);