aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/usblp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/class/usblp.c')
-rw-r--r--drivers/usb/class/usblp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 9eca4053312e..cb3a93243a05 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -58,6 +58,7 @@
58#include <linux/mutex.h> 58#include <linux/mutex.h>
59#undef DEBUG 59#undef DEBUG
60#include <linux/usb.h> 60#include <linux/usb.h>
61#include <linux/ratelimit.h>
61 62
62/* 63/*
63 * Version Information 64 * Version Information
@@ -348,8 +349,7 @@ static int usblp_check_status(struct usblp *usblp, int err)
348 mutex_lock(&usblp->mut); 349 mutex_lock(&usblp->mut);
349 if ((error = usblp_read_status(usblp, usblp->statusbuf)) < 0) { 350 if ((error = usblp_read_status(usblp, usblp->statusbuf)) < 0) {
350 mutex_unlock(&usblp->mut); 351 mutex_unlock(&usblp->mut);
351 if (printk_ratelimit()) 352 printk_ratelimited(KERN_ERR
352 printk(KERN_ERR
353 "usblp%d: error %d reading printer status\n", 353 "usblp%d: error %d reading printer status\n",
354 usblp->minor, error); 354 usblp->minor, error);
355 return 0; 355 return 0;
@@ -653,8 +653,7 @@ static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
653 653
654 case LPGETSTATUS: 654 case LPGETSTATUS:
655 if ((retval = usblp_read_status(usblp, usblp->statusbuf))) { 655 if ((retval = usblp_read_status(usblp, usblp->statusbuf))) {
656 if (printk_ratelimit()) 656 printk_ratelimited(KERN_ERR "usblp%d:"
657 printk(KERN_ERR "usblp%d:"
658 "failed reading printer status (%d)\n", 657 "failed reading printer status (%d)\n",
659 usblp->minor, retval); 658 usblp->minor, retval);
660 retval = -EIO; 659 retval = -EIO;