diff options
Diffstat (limited to 'drivers/usb/serial/mos7840.c')
-rw-r--r-- | drivers/usb/serial/mos7840.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index d5f682626e71..fda4a6421c44 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, | |||
844 | mos7840_port->write_urb_pool[j] = urb; | 844 | mos7840_port->write_urb_pool[j] = urb; |
845 | 845 | ||
846 | if (urb == NULL) { | 846 | if (urb == NULL) { |
847 | err("No more urbs???"); | 847 | dev_err(&port->dev, "No more urbs???\n"); |
848 | continue; | 848 | continue; |
849 | } | 849 | } |
850 | 850 | ||
@@ -853,7 +853,9 @@ static int mos7840_open(struct tty_struct *tty, | |||
853 | if (!urb->transfer_buffer) { | 853 | if (!urb->transfer_buffer) { |
854 | usb_free_urb(urb); | 854 | usb_free_urb(urb); |
855 | mos7840_port->write_urb_pool[j] = NULL; | 855 | mos7840_port->write_urb_pool[j] = NULL; |
856 | err("%s-out of memory for urb buffers.", __func__); | 856 | dev_err(&port->dev, |
857 | "%s-out of memory for urb buffers.\n", | ||
858 | __func__); | ||
857 | continue; | 859 | continue; |
858 | } | 860 | } |
859 | } | 861 | } |
@@ -1021,8 +1023,8 @@ static int mos7840_open(struct tty_struct *tty, | |||
1021 | usb_submit_urb(serial->port[0]->interrupt_in_urb, | 1023 | usb_submit_urb(serial->port[0]->interrupt_in_urb, |
1022 | GFP_KERNEL); | 1024 | GFP_KERNEL); |
1023 | if (response) { | 1025 | if (response) { |
1024 | err("%s - Error %d submitting interrupt urb", | 1026 | dev_err(&port->dev, "%s - Error %d submitting " |
1025 | __func__, response); | 1027 | "interrupt urb\n", __func__, response); |
1026 | } | 1028 | } |
1027 | 1029 | ||
1028 | } | 1030 | } |
@@ -1055,8 +1057,8 @@ static int mos7840_open(struct tty_struct *tty, | |||
1055 | port->bulk_in_endpointAddress); | 1057 | port->bulk_in_endpointAddress); |
1056 | response = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL); | 1058 | response = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL); |
1057 | if (response) { | 1059 | if (response) { |
1058 | err("%s - Error %d submitting control urb", __func__, | 1060 | dev_err(&port->dev, "%s - Error %d submitting control urb\n", |
1059 | response); | 1061 | __func__, response); |
1060 | } | 1062 | } |
1061 | 1063 | ||
1062 | /* initialize our wait queues */ | 1064 | /* initialize our wait queues */ |
@@ -1492,7 +1494,8 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
1492 | kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); | 1494 | kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); |
1493 | 1495 | ||
1494 | if (urb->transfer_buffer == NULL) { | 1496 | if (urb->transfer_buffer == NULL) { |
1495 | err("%s no more kernel memory...", __func__); | 1497 | dev_err(&port->dev, "%s no more kernel memory...\n", |
1498 | __func__); | ||
1496 | goto exit; | 1499 | goto exit; |
1497 | } | 1500 | } |
1498 | } | 1501 | } |
@@ -1517,8 +1520,8 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
1517 | 1520 | ||
1518 | if (status) { | 1521 | if (status) { |
1519 | mos7840_port->busy[i] = 0; | 1522 | mos7840_port->busy[i] = 0; |
1520 | err("%s - usb_submit_urb(write bulk) failed with status = %d", | 1523 | dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed " |
1521 | __func__, status); | 1524 | "with status = %d\n", __func__, status); |
1522 | bytes_sent = status; | 1525 | bytes_sent = status; |
1523 | goto exit; | 1526 | goto exit; |
1524 | } | 1527 | } |
@@ -1856,8 +1859,7 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port, | |||
1856 | /* Calculate the Divisor */ | 1859 | /* Calculate the Divisor */ |
1857 | 1860 | ||
1858 | if (status) { | 1861 | if (status) { |
1859 | err("%s - bad baud rate", __func__); | 1862 | dev_err(&port->dev, "%s - bad baud rate\n", __func__); |
1860 | dbg("%s\n", "bad baud rate"); | ||
1861 | return status; | 1863 | return status; |
1862 | } | 1864 | } |
1863 | /* Enable access to divisor latch */ | 1865 | /* Enable access to divisor latch */ |
@@ -2446,7 +2448,7 @@ static int mos7840_startup(struct usb_serial *serial) | |||
2446 | for (i = 0; i < serial->num_ports; ++i) { | 2448 | for (i = 0; i < serial->num_ports; ++i) { |
2447 | mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL); | 2449 | mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL); |
2448 | if (mos7840_port == NULL) { | 2450 | if (mos7840_port == NULL) { |
2449 | err("%s - Out of memory", __func__); | 2451 | dev_err(&dev->dev, "%s - Out of memory\n", __func__); |
2450 | status = -ENOMEM; | 2452 | status = -ENOMEM; |
2451 | i--; /* don't follow NULL pointer cleaning up */ | 2453 | i--; /* don't follow NULL pointer cleaning up */ |
2452 | goto error; | 2454 | goto error; |