]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb/class: use printk_ratelimited() instead of printk_ratelimit()
authorManuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Thu, 16 Jun 2011 12:15:54 +0000 (14:15 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Jul 2011 21:43:24 +0000 (14:43 -0700)
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: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/class/usblp.c

index 9eca4053312efa320cea4b63325dd839b46f4185..cb3a93243a052f6bdb4f6455c0f4e44a54e82ee9 100644 (file)
@@ -58,6 +58,7 @@
 #include <linux/mutex.h>
 #undef DEBUG
 #include <linux/usb.h>
+#include <linux/ratelimit.h>
 
 /*
  * Version Information
@@ -348,8 +349,7 @@ static int usblp_check_status(struct usblp *usblp, int err)
        mutex_lock(&usblp->mut);
        if ((error = usblp_read_status(usblp, usblp->statusbuf)) < 0) {
                mutex_unlock(&usblp->mut);
-               if (printk_ratelimit())
-                       printk(KERN_ERR
+               printk_ratelimited(KERN_ERR
                                "usblp%d: error %d reading printer status\n",
                                usblp->minor, error);
                return 0;
@@ -653,8 +653,7 @@ static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
                case LPGETSTATUS:
                        if ((retval = usblp_read_status(usblp, usblp->statusbuf))) {
-                               if (printk_ratelimit())
-                                       printk(KERN_ERR "usblp%d:"
+                               printk_ratelimited(KERN_ERR "usblp%d:"
                                            "failed reading printer status (%d)\n",
                                            usblp->minor, retval);
                                retval = -EIO;