diff options
Diffstat (limited to 'drivers/usb/serial/mos7840.c')
-rw-r--r-- | drivers/usb/serial/mos7840.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 60543d79ef5..fda4a6421c4 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -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; @@ -2743,7 +2745,8 @@ static int __init moschip7840_init(void) goto failed_port_device_register; dbg("%s\n", "Entring..."); - info(DRIVER_DESC " " DRIVER_VERSION); + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" + DRIVER_DESC "\n"); /* Register with the usb */ retval = usb_register(&io_driver); |