]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/serial/mos7840.c
USB: remove use of err() in drivers/usb/serial
[linux-2.6-omap-h63xx.git] / drivers / usb / serial / mos7840.c
index d5f682626e7123ba41144846d665467d2f006846..fda4a6421c44226abf6d905a707eb5e4f5bec505 100644 (file)
@@ -844,7 +844,7 @@ static int mos7840_open(struct tty_struct *tty,
                mos7840_port->write_urb_pool[j] = urb;
 
                if (urb == NULL) {
-                       err("No more urbs???");
+                       dev_err(&port->dev, "No more urbs???\n");
                        continue;
                }
 
@@ -853,7 +853,9 @@ static int mos7840_open(struct tty_struct *tty,
                if (!urb->transfer_buffer) {
                        usb_free_urb(urb);
                        mos7840_port->write_urb_pool[j] = NULL;
-                       err("%s-out of memory for urb buffers.", __func__);
+                       dev_err(&port->dev,
+                               "%s-out of memory for urb buffers.\n",
+                               __func__);
                        continue;
                }
        }
@@ -1021,8 +1023,8 @@ static int mos7840_open(struct tty_struct *tty,
                            usb_submit_urb(serial->port[0]->interrupt_in_urb,
                                           GFP_KERNEL);
                        if (response) {
-                               err("%s - Error %d submitting interrupt urb",
-                                   __func__, response);
+                               dev_err(&port->dev, "%s - Error %d submitting "
+                                       "interrupt urb\n", __func__, response);
                        }
 
                }
@@ -1055,8 +1057,8 @@ static int mos7840_open(struct tty_struct *tty,
            port->bulk_in_endpointAddress);
        response = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL);
        if (response) {
-               err("%s - Error %d submitting control urb", __func__,
-                   response);
+               dev_err(&port->dev, "%s - Error %d submitting control urb\n",
+                       __func__, response);
        }
 
        /* initialize our wait queues */
@@ -1492,7 +1494,8 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port,
                    kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
 
                if (urb->transfer_buffer == NULL) {
-                       err("%s no more kernel memory...", __func__);
+                       dev_err(&port->dev, "%s no more kernel memory...\n",
+                               __func__);
                        goto exit;
                }
        }
@@ -1517,8 +1520,8 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port,
 
        if (status) {
                mos7840_port->busy[i] = 0;
-               err("%s - usb_submit_urb(write bulk) failed with status = %d",
-                   __func__, status);
+               dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed "
+                       "with status = %d\n", __func__, status);
                bytes_sent = status;
                goto exit;
        }
@@ -1856,8 +1859,7 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
                /* Calculate the Divisor */
 
                if (status) {
-                       err("%s - bad baud rate", __func__);
-                       dbg("%s\n", "bad baud rate");
+                       dev_err(&port->dev, "%s - bad baud rate\n", __func__);
                        return status;
                }
                /* Enable access to divisor latch */
@@ -2446,7 +2448,7 @@ static int mos7840_startup(struct usb_serial *serial)
        for (i = 0; i < serial->num_ports; ++i) {
                mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
                if (mos7840_port == NULL) {
-                       err("%s - Out of memory", __func__);
+                       dev_err(&dev->dev, "%s - Out of memory\n", __func__);
                        status = -ENOMEM;
                        i--; /* don't follow NULL pointer cleaning up */
                        goto error;