aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/kl5kusb105.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/kl5kusb105.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/kl5kusb105.c')
-rw-r--r--drivers/usb/serial/kl5kusb105.c46
1 files changed, 29 insertions, 17 deletions
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index 573c6972fae7..dc36a052766f 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -182,7 +182,8 @@ static int klsi_105_chg_port_settings(struct usb_serial_port *port,
182 sizeof(struct klsi_105_port_settings), 182 sizeof(struct klsi_105_port_settings),
183 KLSI_TIMEOUT); 183 KLSI_TIMEOUT);
184 if (rc < 0) 184 if (rc < 0)
185 err("Change port settings failed (error = %d)", rc); 185 dev_err(&port->dev,
186 "Change port settings failed (error = %d)\n", rc);
186 dev_info(&port->serial->dev->dev, 187 dev_info(&port->serial->dev->dev,
187 "%d byte block, baudrate %x, databits %d, u1 %d, u2 %d\n", 188 "%d byte block, baudrate %x, databits %d, u1 %d, u2 %d\n",
188 settings->pktlen, settings->baudrate, settings->databits, 189 settings->pktlen, settings->baudrate, settings->databits,
@@ -225,7 +226,8 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
225 10000 226 10000
226 ); 227 );
227 if (rc < 0) 228 if (rc < 0)
228 err("Reading line status failed (error = %d)", rc); 229 dev_err(&port->dev, "Reading line status failed (error = %d)\n",
230 rc);
229 else { 231 else {
230 status = get_unaligned_le16(status_buf); 232 status = get_unaligned_le16(status_buf);
231 233
@@ -279,15 +281,16 @@ static int klsi_105_startup(struct usb_serial *serial)
279 281
280 priv->write_urb_pool[j] = urb; 282 priv->write_urb_pool[j] = urb;
281 if (urb == NULL) { 283 if (urb == NULL) {
282 err("No more urbs???"); 284 dev_err(&serial->dev->dev, "No more urbs???\n");
283 goto err_cleanup; 285 goto err_cleanup;
284 } 286 }
285 287
286 urb->transfer_buffer = 288 urb->transfer_buffer =
287 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); 289 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
288 if (!urb->transfer_buffer) { 290 if (!urb->transfer_buffer) {
289 err("%s - out of memory for urb buffers.", 291 dev_err(&serial->dev->dev,
290 __func__); 292 "%s - out of memory for urb buffers.\n",
293 __func__);
291 goto err_cleanup; 294 goto err_cleanup;
292 } 295 }
293 } 296 }
@@ -408,7 +411,8 @@ static int klsi_105_open(struct tty_struct *tty,
408 411
409 rc = usb_submit_urb(port->read_urb, GFP_KERNEL); 412 rc = usb_submit_urb(port->read_urb, GFP_KERNEL);
410 if (rc) { 413 if (rc) {
411 err("%s - failed submitting read urb, error %d", __func__, rc); 414 dev_err(&port->dev, "%s - failed submitting read urb, "
415 "error %d\n", __func__, rc);
412 retval = rc; 416 retval = rc;
413 goto exit; 417 goto exit;
414 } 418 }
@@ -423,7 +427,7 @@ static int klsi_105_open(struct tty_struct *tty,
423 0, 427 0,
424 KLSI_TIMEOUT); 428 KLSI_TIMEOUT);
425 if (rc < 0) { 429 if (rc < 0) {
426 err("Enabling read failed (error = %d)", rc); 430 dev_err(&port->dev, "Enabling read failed (error = %d)\n", rc);
427 retval = rc; 431 retval = rc;
428 } else 432 } else
429 dbg("%s - enabled reading", __func__); 433 dbg("%s - enabled reading", __func__);
@@ -463,7 +467,8 @@ static void klsi_105_close(struct tty_struct *tty,
463 NULL, 0, 467 NULL, 0,
464 KLSI_TIMEOUT); 468 KLSI_TIMEOUT);
465 if (rc < 0) 469 if (rc < 0)
466 err("Disabling read failed (error = %d)", rc); 470 dev_err(&port->dev,
471 "Disabling read failed (error = %d)\n", rc);
467 } 472 }
468 mutex_unlock(&port->serial->disc_mutex); 473 mutex_unlock(&port->serial->disc_mutex);
469 474
@@ -522,7 +527,9 @@ static int klsi_105_write(struct tty_struct *tty,
522 urb->transfer_buffer = 527 urb->transfer_buffer =
523 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC); 528 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
524 if (urb->transfer_buffer == NULL) { 529 if (urb->transfer_buffer == NULL) {
525 err("%s - no more kernel memory...", __func__); 530 dev_err(&port->dev,
531 "%s - no more kernel memory...\n",
532 __func__);
526 goto exit; 533 goto exit;
527 } 534 }
528 } 535 }
@@ -549,8 +556,9 @@ static int klsi_105_write(struct tty_struct *tty,
549 /* send the data out the bulk port */ 556 /* send the data out the bulk port */
550 result = usb_submit_urb(urb, GFP_ATOMIC); 557 result = usb_submit_urb(urb, GFP_ATOMIC);
551 if (result) { 558 if (result) {
552 err("%s - failed submitting write urb, error %d", 559 dev_err(&port->dev,
553 __func__, result); 560 "%s - failed submitting write urb, error %d\n",
561 __func__, result);
554 goto exit; 562 goto exit;
555 } 563 }
556 buf += size; 564 buf += size;
@@ -694,8 +702,9 @@ static void klsi_105_read_bulk_callback(struct urb *urb)
694 port); 702 port);
695 rc = usb_submit_urb(port->read_urb, GFP_ATOMIC); 703 rc = usb_submit_urb(port->read_urb, GFP_ATOMIC);
696 if (rc) 704 if (rc)
697 err("%s - failed resubmitting read urb, error %d", 705 dev_err(&port->dev,
698 __func__, rc); 706 "%s - failed resubmitting read urb, error %d\n",
707 __func__, rc);
699} /* klsi_105_read_bulk_callback */ 708} /* klsi_105_read_bulk_callback */
700 709
701 710
@@ -799,7 +808,8 @@ static void klsi_105_set_termios(struct tty_struct *tty,
799 priv->cfg.databits = kl5kusb105a_dtb_8; 808 priv->cfg.databits = kl5kusb105a_dtb_8;
800 break; 809 break;
801 default: 810 default:
802 err("CSIZE was not CS5-CS8, using default of 8"); 811 dev_err(&port->dev,
812 "CSIZE was not CS5-CS8, using default of 8\n");
803 priv->cfg.databits = kl5kusb105a_dtb_8; 813 priv->cfg.databits = kl5kusb105a_dtb_8;
804 break; 814 break;
805 } 815 }
@@ -886,7 +896,8 @@ static int klsi_105_tiocmget(struct tty_struct *tty, struct file *file)
886 896
887 rc = klsi_105_get_line_state(port, &line_state); 897 rc = klsi_105_get_line_state(port, &line_state);
888 if (rc < 0) { 898 if (rc < 0) {
889 err("Reading line control failed (error = %d)", rc); 899 dev_err(&port->dev,
900 "Reading line control failed (error = %d)\n", rc);
890 /* better return value? EAGAIN? */ 901 /* better return value? EAGAIN? */
891 return rc; 902 return rc;
892 } 903 }
@@ -944,8 +955,9 @@ static void klsi_105_unthrottle(struct tty_struct *tty)
944 port->read_urb->dev = port->serial->dev; 955 port->read_urb->dev = port->serial->dev;
945 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 956 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
946 if (result) 957 if (result)
947 err("%s - failed submitting read urb, error %d", __func__, 958 dev_err(&port->dev,
948 result); 959 "%s - failed submitting read urb, error %d\n",
960 __func__, result);
949} 961}
950 962
951 963