From: Manuel Zerpies Date: Thu, 16 Jun 2011 12:15:54 +0000 (+0200) Subject: usb/class: use printk_ratelimited() instead of printk_ratelimit() X-Git-Tag: next-20110726~6^2~36 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=305e7be5d5724ced063fcf21c3df6bd0fed19a04;p=karo-tx-linux.git 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 Signed-off-by: Greg Kroah-Hartman --- 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 @@ #include #undef DEBUG #include +#include /* * 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;