From de15fe3ed9c3d959adb6c3ccd28dc63f4a1337a9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 20 Apr 2012 16:53:19 -0700 Subject: [PATCH] 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 CC: Mori Hess CC: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt9812.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt9812.c b/drivers/staging/comedi/drivers/dt9812.c index e86ab5862895..89a49dda4482 100644 --- a/drivers/staging/comedi/drivers/dt9812.c +++ b/drivers/staging/comedi/drivers/dt9812.c @@ -547,7 +547,7 @@ static void dt9812_configure_gain(struct usb_dt9812 *dev, rmw->or_value = F020_MASK_ADC0CF_AMP0GN2; break; 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, iface_desc = interface->cur_altsetting; if (iface_desc->desc.bNumEndpoints != 5) { - err("Wrong number of endpints."); + dev_err(&interface->dev, "Wrong number of endpoints.\n"); retval = -ENODEV; goto error; } @@ -781,22 +781,22 @@ static int dt9812_probe(struct usb_interface *interface, } 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; goto error; } 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; goto error; } 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; goto error; } 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; goto error; } @@ -1146,7 +1146,9 @@ static int __init usb_dt9812_init(void) result = comedi_driver_register(&dt9812_comedi_driver); if (result) { 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; -- 2.30.2