USB: remove err() macro from usb misc drivers
USB should not be having it's own printk macros, so remove err() and use the system-wide standard of dev_err() wherever possible. In the few places that will not work out, use a basic printk(). Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -283,8 +283,8 @@ static int adu_open(struct inode *inode, struct file *file)
|
||||
|
||||
interface = usb_find_interface(&adu_driver, subminor);
|
||||
if (!interface) {
|
||||
err("%s - error, can't find device for minor %d",
|
||||
__func__, subminor);
|
||||
printk(KERN_ERR "adutux: %s - error, can't find device for "
|
||||
"minor %d\n", __func__, subminor);
|
||||
retval = -ENODEV;
|
||||
goto exit_no_device;
|
||||
}
|
||||
@@ -416,7 +416,8 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
|
||||
/* verify that the device wasn't unplugged */
|
||||
if (dev->udev == NULL) {
|
||||
retval = -ENODEV;
|
||||
err("No device or device unplugged %d", retval);
|
||||
printk(KERN_ERR "adutux: No device or device unplugged %d\n",
|
||||
retval);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -576,7 +577,8 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
|
||||
/* verify that the device wasn't unplugged */
|
||||
if (dev->udev == NULL) {
|
||||
retval = -ENODEV;
|
||||
err("No device or device unplugged %d", retval);
|
||||
printk(KERN_ERR "adutux: No device or device unplugged %d\n",
|
||||
retval);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -645,7 +647,8 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
|
||||
retval = usb_submit_urb(dev->interrupt_out_urb, GFP_KERNEL);
|
||||
if (retval < 0) {
|
||||
dev->out_urb_finished = 1;
|
||||
err("Couldn't submit interrupt_out_urb %d", retval);
|
||||
dev_err(&dev->udev->dev, "Couldn't submit "
|
||||
"interrupt_out_urb %d\n", retval);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -890,8 +893,8 @@ static int __init adu_init(void)
|
||||
/* register this driver with the USB subsystem */
|
||||
result = usb_register(&adu_driver);
|
||||
if (result < 0) {
|
||||
err("usb_register failed for the "__FILE__" driver. "
|
||||
"Error number %d", result);
|
||||
printk(KERN_ERR "usb_register failed for the "__FILE__
|
||||
" driver. Error number %d\n", result);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user