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: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
8220796df8
commit
305e7be5d5
|
@ -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)
|
||||||
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)
|
||||||
|
|
||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue