Commit d751e623969bf758f3f75f59418b19ede570ab50

Authored by Manuel Zerpies
Committed by David S. Miller
1 parent c63d6ea306

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>

Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff

... ... @@ -58,6 +58,7 @@
58 58 #include <linux/skbuff.h>
59 59 #include <linux/can.h>
60 60 #include <linux/can/core.h>
  61 +#include <linux/ratelimit.h>
61 62 #include <net/net_namespace.h>
62 63 #include <net/sock.h>
63 64  
... ... @@ -161,8 +162,8 @@
161 162 * return the error code immediately. Below we will
162 163 * return -EPROTONOSUPPORT
163 164 */
164   - if (err && printk_ratelimit())
165   - printk(KERN_ERR "can: request_module "
  165 + if (err)
  166 + printk_ratelimited(KERN_ERR "can: request_module "
166 167 "(can-proto-%d) failed.\n", protocol);
167 168  
168 169 cp = can_get_proto(protocol);