aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mos7720.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-08-20 19:56:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-17 17:41:10 -0400
commit194343d9364ea07c9f27c4505380a15a905e8a24 (patch)
tree9c3336daa16fb74f8c669357a7850c2c1452ad8e /drivers/usb/serial/mos7720.c
parentb887265c165f94917d0f565b1883a6e7b3c8388c (diff)
USB: remove use of err() in drivers/usb/serial
err() is going away, so switch to dev_err() or printk() if it's really needed. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/mos7720.c')
-rw-r--r--drivers/usb/serial/mos7720.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 5711aa55d24..e772cc0a97f 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -355,14 +355,16 @@ static int mos7720_open(struct tty_struct *tty,
355 mos7720_port->write_urb_pool[j] = urb; 355 mos7720_port->write_urb_pool[j] = urb;
356 356
357 if (urb == NULL) { 357 if (urb == NULL) {
358 err("No more urbs???"); 358 dev_err(&port->dev, "No more urbs???\n");
359 continue; 359 continue;
360 } 360 }
361 361
362 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, 362 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
363 GFP_KERNEL); 363 GFP_KERNEL);
364 if (!urb->transfer_buffer) { 364 if (!urb->transfer_buffer) {
365 err("%s-out of memory for urb buffers.", __func__); 365 dev_err(&port->dev,
366 "%s-out of memory for urb buffers.\n",
367 __func__);
366 usb_free_urb(mos7720_port->write_urb_pool[j]); 368 usb_free_urb(mos7720_port->write_urb_pool[j]);
367 mos7720_port->write_urb_pool[j] = NULL; 369 mos7720_port->write_urb_pool[j] = NULL;
368 continue; 370 continue;
@@ -694,7 +696,8 @@ static int mos7720_write(struct tty_struct *tty, struct usb_serial_port *port,
694 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, 696 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
695 GFP_KERNEL); 697 GFP_KERNEL);
696 if (urb->transfer_buffer == NULL) { 698 if (urb->transfer_buffer == NULL) {
697 err("%s no more kernel memory...", __func__); 699 dev_err(&port->dev, "%s no more kernel memory...\n",
700 __func__);
698 goto exit; 701 goto exit;
699 } 702 }
700 } 703 }
@@ -714,8 +717,8 @@ static int mos7720_write(struct tty_struct *tty, struct usb_serial_port *port,
714 /* send it down the pipe */ 717 /* send it down the pipe */
715 status = usb_submit_urb(urb, GFP_ATOMIC); 718 status = usb_submit_urb(urb, GFP_ATOMIC);
716 if (status) { 719 if (status) {
717 err("%s - usb_submit_urb(write bulk) failed with status = %d", 720 dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed "
718 __func__, status); 721 "with status = %d\n", __func__, status);
719 bytes_sent = status; 722 bytes_sent = status;
720 goto exit; 723 goto exit;
721 } 724 }
@@ -975,7 +978,7 @@ static int send_cmd_write_baud_rate(struct moschip_port *mos7720_port,
975 /* Calculate the Divisor */ 978 /* Calculate the Divisor */
976 status = calc_baud_rate_divisor(baudrate, &divisor); 979 status = calc_baud_rate_divisor(baudrate, &divisor);
977 if (status) { 980 if (status) {
978 err("%s - bad baud rate", __func__); 981 dev_err(&port->dev, "%s - bad baud rate\n", __func__);
979 return status; 982 return status;
980 } 983 }
981 984
@@ -1478,7 +1481,7 @@ static int mos7720_startup(struct usb_serial *serial)
1478 /* create our private serial structure */ 1481 /* create our private serial structure */
1479 mos7720_serial = kzalloc(sizeof(struct moschip_serial), GFP_KERNEL); 1482 mos7720_serial = kzalloc(sizeof(struct moschip_serial), GFP_KERNEL);
1480 if (mos7720_serial == NULL) { 1483 if (mos7720_serial == NULL) {
1481 err("%s - Out of memory", __func__); 1484 dev_err(&dev->dev, "%s - Out of memory\n", __func__);
1482 return -ENOMEM; 1485 return -ENOMEM;
1483 } 1486 }
1484 1487
@@ -1491,7 +1494,7 @@ static int mos7720_startup(struct usb_serial *serial)
1491 for (i = 0; i < serial->num_ports; ++i) { 1494 for (i = 0; i < serial->num_ports; ++i) {
1492 mos7720_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL); 1495 mos7720_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
1493 if (mos7720_port == NULL) { 1496 if (mos7720_port == NULL) {
1494 err("%s - Out of memory", __func__); 1497 dev_err(&dev->dev, "%s - Out of memory\n", __func__);
1495 usb_set_serial_data(serial, NULL); 1498 usb_set_serial_data(serial, NULL);
1496 kfree(mos7720_serial); 1499 kfree(mos7720_serial);
1497 return -ENOMEM; 1500 return -ENOMEM;