USB: dt9812.c: remove err() usage
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Apr 2012 23:53:19 +0000 (16:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Apr 2012 23:53:19 +0000 (16:53 -0700)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dt9812.c

index e86ab5862895dde35466d20c2c1dec38d10aa154..89a49dda44825804cd9b1fe1dfe711978028c10a 100644 (file)
@@ -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;