Commit de15fe3e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: dt9812.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Ian Abbott <abbotti@mev.co.uk>
CC: Mori Hess <fmhess@users.sourceforge.net>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fc433dea
...@@ -547,7 +547,7 @@ static void dt9812_configure_gain(struct usb_dt9812 *dev, ...@@ -547,7 +547,7 @@ static void dt9812_configure_gain(struct usb_dt9812 *dev,
rmw->or_value = F020_MASK_ADC0CF_AMP0GN2; rmw->or_value = F020_MASK_ADC0CF_AMP0GN2;
break; break;
default: default:
err("Illegal gain %d\n", gain); dev_err(&dev->interface->dev, "Illegal gain %d\n", gain);
} }
} }
...@@ -715,7 +715,7 @@ static int dt9812_probe(struct usb_interface *interface, ...@@ -715,7 +715,7 @@ static int dt9812_probe(struct usb_interface *interface,
iface_desc = interface->cur_altsetting; iface_desc = interface->cur_altsetting;
if (iface_desc->desc.bNumEndpoints != 5) { if (iface_desc->desc.bNumEndpoints != 5) {
err("Wrong number of endpints."); dev_err(&interface->dev, "Wrong number of endpoints.\n");
retval = -ENODEV; retval = -ENODEV;
goto error; goto error;
} }
...@@ -781,22 +781,22 @@ static int dt9812_probe(struct usb_interface *interface, ...@@ -781,22 +781,22 @@ static int dt9812_probe(struct usb_interface *interface,
} }
if (dt9812_read_info(dev, 1, &dev->vendor, sizeof(dev->vendor)) != 0) { if (dt9812_read_info(dev, 1, &dev->vendor, sizeof(dev->vendor)) != 0) {
err("Failed to read vendor."); dev_err(&interface->dev, "Failed to read vendor.\n");
retval = -ENODEV; retval = -ENODEV;
goto error; goto error;
} }
if (dt9812_read_info(dev, 3, &dev->product, sizeof(dev->product)) != 0) { if (dt9812_read_info(dev, 3, &dev->product, sizeof(dev->product)) != 0) {
err("Failed to read product."); dev_err(&interface->dev, "Failed to read product.\n");
retval = -ENODEV; retval = -ENODEV;
goto error; goto error;
} }
if (dt9812_read_info(dev, 5, &dev->device, sizeof(dev->device)) != 0) { if (dt9812_read_info(dev, 5, &dev->device, sizeof(dev->device)) != 0) {
err("Failed to read device."); dev_err(&interface->dev, "Failed to read device.\n");
retval = -ENODEV; retval = -ENODEV;
goto error; goto error;
} }
if (dt9812_read_info(dev, 7, &dev->serial, sizeof(dev->serial)) != 0) { if (dt9812_read_info(dev, 7, &dev->serial, sizeof(dev->serial)) != 0) {
err("Failed to read serial."); dev_err(&interface->dev, "Failed to read serial.\n");
retval = -ENODEV; retval = -ENODEV;
goto error; goto error;
} }
...@@ -1146,7 +1146,9 @@ static int __init usb_dt9812_init(void) ...@@ -1146,7 +1146,9 @@ static int __init usb_dt9812_init(void)
result = comedi_driver_register(&dt9812_comedi_driver); result = comedi_driver_register(&dt9812_comedi_driver);
if (result) { if (result) {
usb_deregister(&dt9812_usb_driver); usb_deregister(&dt9812_usb_driver);
err("comedi_driver_register failed. Error number %d", result); printk(KERN_ERR KBUILD_MODNAME
": comedi_driver_register failed. Error number %d\n",
result);
} }
return result; return result;
......
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