USB: catc.c: remove err() usage
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2012 19:37:47 +0000 (12:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2012 19:37:47 +0000 (12:37 -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.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/catc.c

index 182cfb4aeb1da9703c189e562ad262f9be3c88b5..5a73730b32eb62eb9db542c7b889c6b1973ee029 100644 (file)
@@ -338,16 +338,18 @@ static void catc_irq_done(struct urb *urb)
                } else {
                        catc->rx_urb->dev = catc->usbdev;
                        if ((res = usb_submit_urb(catc->rx_urb, GFP_ATOMIC)) < 0) {
-                               err("submit(rx_urb) status %d", res);
+                               dev_err(&catc->usbdev->dev,
+                                       "submit(rx_urb) status %d\n", res);
                        }
                } 
        }
 resubmit:
        res = usb_submit_urb (urb, GFP_ATOMIC);
        if (res)
-               err ("can't resubmit intr, %s-%s, status %d",
-                               catc->usbdev->bus->bus_name,
-                               catc->usbdev->devpath, res);
+               dev_err(&catc->usbdev->dev,
+                       "can't resubmit intr, %s-%s, status %d\n",
+                       catc->usbdev->bus->bus_name,
+                       catc->usbdev->devpath, res);
 }
 
 /*
@@ -366,7 +368,8 @@ static int catc_tx_run(struct catc *catc)
        catc->tx_urb->dev = catc->usbdev;
 
        if ((status = usb_submit_urb(catc->tx_urb, GFP_ATOMIC)) < 0)
-               err("submit(tx_urb), status %d", status);
+               dev_err(&catc->usbdev->dev, "submit(tx_urb), status %d\n",
+                       status);
 
        catc->tx_idx = !catc->tx_idx;
        catc->tx_ptr = 0;
@@ -496,7 +499,8 @@ static void catc_ctrl_run(struct catc *catc)
                memcpy(catc->ctrl_buf, q->buf, q->len);
 
        if ((status = usb_submit_urb(catc->ctrl_urb, GFP_ATOMIC)))
-               err("submit(ctrl_urb) status %d", status);
+               dev_err(&catc->usbdev->dev, "submit(ctrl_urb) status %d\n",
+                       status);
 }
 
 static void catc_ctrl_done(struct urb *urb)
@@ -555,7 +559,7 @@ static int catc_ctrl_async(struct catc *catc, u8 dir, u8 request, u16 value,
        catc->ctrl_head = (catc->ctrl_head + 1) & (CTRL_QUEUE - 1);
 
        if (catc->ctrl_head == catc->ctrl_tail) {
-               err("ctrl queue full");
+               dev_err(&catc->usbdev->dev, "ctrl queue full\n");
                catc->ctrl_tail = (catc->ctrl_tail + 1) & (CTRL_QUEUE - 1);
                retval = -1;
        }
@@ -714,7 +718,8 @@ static int catc_open(struct net_device *netdev)
 
        catc->irq_urb->dev = catc->usbdev;
        if ((status = usb_submit_urb(catc->irq_urb, GFP_KERNEL)) < 0) {
-               err("submit(irq_urb) status %d", status);
+               dev_err(&catc->usbdev->dev, "submit(irq_urb) status %d\n",
+                       status);
                return -1;
        }
 
@@ -769,7 +774,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
 
        if (usb_set_interface(usbdev,
                        intf->altsetting->desc.bInterfaceNumber, 1)) {
-                err("Can't set altsetting 1.");
+                dev_err(&intf->dev, "Can't set altsetting 1.\n");
                return -EIO;
        }
 
@@ -799,7 +804,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
        catc->irq_urb = usb_alloc_urb(0, GFP_KERNEL);
        if ((!catc->ctrl_urb) || (!catc->tx_urb) || 
            (!catc->rx_urb) || (!catc->irq_urb)) {
-               err("No free urbs available.");
+               dev_err(&intf->dev, "No free urbs available.\n");
                usb_free_urb(catc->ctrl_urb);
                usb_free_urb(catc->tx_urb);
                usb_free_urb(catc->rx_urb);