Commit 305e7be5 authored by Manuel Zerpies's avatar Manuel Zerpies Committed by Greg Kroah-Hartman

usb/class: 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: default avatarManuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8220796d
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#include <linux/mutex.h> #include <linux/mutex.h>
#undef DEBUG #undef DEBUG
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/ratelimit.h>
/* /*
* Version Information * Version Information
...@@ -348,8 +349,7 @@ static int usblp_check_status(struct usblp *usblp, int err) ...@@ -348,8 +349,7 @@ static int usblp_check_status(struct usblp *usblp, int err)
mutex_lock(&usblp->mut); mutex_lock(&usblp->mut);
if ((error = usblp_read_status(usblp, usblp->statusbuf)) < 0) { if ((error = usblp_read_status(usblp, usblp->statusbuf)) < 0) {
mutex_unlock(&usblp->mut); mutex_unlock(&usblp->mut);
if (printk_ratelimit()) printk_ratelimited(KERN_ERR
printk(KERN_ERR
"usblp%d: error %d reading printer status\n", "usblp%d: error %d reading printer status\n",
usblp->minor, error); usblp->minor, error);
return 0; return 0;
...@@ -653,8 +653,7 @@ static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -653,8 +653,7 @@ static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case LPGETSTATUS: case LPGETSTATUS:
if ((retval = usblp_read_status(usblp, usblp->statusbuf))) { if ((retval = usblp_read_status(usblp, usblp->statusbuf))) {
if (printk_ratelimit()) printk_ratelimited(KERN_ERR "usblp%d:"
printk(KERN_ERR "usblp%d:"
"failed reading printer status (%d)\n", "failed reading printer status (%d)\n",
usblp->minor, retval); usblp->minor, retval);
retval = -EIO; retval = -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment