diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-20 19:56:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:41:10 -0400 |
commit | 194343d9364ea07c9f27c4505380a15a905e8a24 (patch) | |
tree | 9c3336daa16fb74f8c669357a7850c2c1452ad8e /drivers | |
parent | b887265c165f94917d0f565b1883a6e7b3c8388c (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')
-rw-r--r-- | drivers/usb/serial/aircable.c | 8 | ||||
-rw-r--r-- | drivers/usb/serial/belkin_sa.c | 34 | ||||
-rw-r--r-- | drivers/usb/serial/cyberjack.c | 23 | ||||
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 18 | ||||
-rw-r--r-- | drivers/usb/serial/digi_acceleport.c | 65 | ||||
-rw-r--r-- | drivers/usb/serial/empeg.c | 8 | ||||
-rw-r--r-- | drivers/usb/serial/ezusb.c | 3 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 68 | ||||
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 16 | ||||
-rw-r--r-- | drivers/usb/serial/ipaq.c | 27 | ||||
-rw-r--r-- | drivers/usb/serial/keyspan_pda.c | 14 | ||||
-rw-r--r-- | drivers/usb/serial/kl5kusb105.c | 46 | ||||
-rw-r--r-- | drivers/usb/serial/mct_u232.c | 39 | ||||
-rw-r--r-- | drivers/usb/serial/mos7720.c | 19 | ||||
-rw-r--r-- | drivers/usb/serial/mos7840.c | 26 | ||||
-rw-r--r-- | drivers/usb/serial/omninet.c | 19 | ||||
-rw-r--r-- | drivers/usb/serial/safe_serial.c | 15 | ||||
-rw-r--r-- | drivers/usb/serial/spcp8x5.c | 7 | ||||
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 19 | ||||
-rw-r--r-- | drivers/usb/serial/visor.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/whiteheat.c | 113 |
21 files changed, 346 insertions, 243 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c index 99fb7dc59c45..537f953bd7f8 100644 --- a/drivers/usb/serial/aircable.c +++ b/drivers/usb/serial/aircable.c | |||
@@ -220,8 +220,8 @@ static void aircable_send(struct usb_serial_port *port) | |||
220 | 220 | ||
221 | buf = kzalloc(count + HCI_HEADER_LENGTH, GFP_ATOMIC); | 221 | buf = kzalloc(count + HCI_HEADER_LENGTH, GFP_ATOMIC); |
222 | if (!buf) { | 222 | if (!buf) { |
223 | err("%s- kzalloc(%d) failed.", __func__, | 223 | dev_err(&port->dev, "%s- kzalloc(%d) failed.\n", |
224 | count + HCI_HEADER_LENGTH); | 224 | __func__, count + HCI_HEADER_LENGTH); |
225 | return; | 225 | return; |
226 | } | 226 | } |
227 | 227 | ||
@@ -276,7 +276,7 @@ static void aircable_read(struct work_struct *work) | |||
276 | 276 | ||
277 | if (!tty) { | 277 | if (!tty) { |
278 | schedule_work(&priv->rx_work); | 278 | schedule_work(&priv->rx_work); |
279 | err("%s - No tty available", __func__); | 279 | dev_err(&port->dev, "%s - No tty available\n", __func__); |
280 | return ; | 280 | return ; |
281 | } | 281 | } |
282 | 282 | ||
@@ -336,7 +336,7 @@ static int aircable_attach(struct usb_serial *serial) | |||
336 | 336 | ||
337 | priv = kzalloc(sizeof(struct aircable_private), GFP_KERNEL); | 337 | priv = kzalloc(sizeof(struct aircable_private), GFP_KERNEL); |
338 | if (!priv) { | 338 | if (!priv) { |
339 | err("%s- kmalloc(%Zd) failed.", __func__, | 339 | dev_err(&port->dev, "%s- kmalloc(%Zd) failed.\n", __func__, |
340 | sizeof(struct aircable_private)); | 340 | sizeof(struct aircable_private)); |
341 | return -ENOMEM; | 341 | return -ENOMEM; |
342 | } | 342 | } |
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c index bb19f1c2e0d3..b7eacad4d48c 100644 --- a/drivers/usb/serial/belkin_sa.c +++ b/drivers/usb/serial/belkin_sa.c | |||
@@ -228,7 +228,7 @@ static int belkin_sa_open(struct tty_struct *tty, | |||
228 | port->read_urb->dev = port->serial->dev; | 228 | port->read_urb->dev = port->serial->dev; |
229 | retval = usb_submit_urb(port->read_urb, GFP_KERNEL); | 229 | retval = usb_submit_urb(port->read_urb, GFP_KERNEL); |
230 | if (retval) { | 230 | if (retval) { |
231 | err("usb_submit_urb(read bulk) failed"); | 231 | dev_err(&port->dev, "usb_submit_urb(read bulk) failed\n"); |
232 | goto exit; | 232 | goto exit; |
233 | } | 233 | } |
234 | 234 | ||
@@ -236,7 +236,7 @@ static int belkin_sa_open(struct tty_struct *tty, | |||
236 | retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); | 236 | retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); |
237 | if (retval) { | 237 | if (retval) { |
238 | usb_kill_urb(port->read_urb); | 238 | usb_kill_urb(port->read_urb); |
239 | err(" usb_submit_urb(read int) failed"); | 239 | dev_err(&port->dev, "usb_submit_urb(read int) failed\n"); |
240 | } | 240 | } |
241 | 241 | ||
242 | exit: | 242 | exit: |
@@ -342,8 +342,8 @@ static void belkin_sa_read_int_callback(struct urb *urb) | |||
342 | exit: | 342 | exit: |
343 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 343 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
344 | if (retval) | 344 | if (retval) |
345 | err("%s - usb_submit_urb failed with result %d", | 345 | dev_err(&port->dev, "%s - usb_submit_urb failed with " |
346 | __func__, retval); | 346 | "result %d\n", __func__, retval); |
347 | } | 347 | } |
348 | 348 | ||
349 | static void belkin_sa_set_termios(struct tty_struct *tty, | 349 | static void belkin_sa_set_termios(struct tty_struct *tty, |
@@ -382,12 +382,12 @@ static void belkin_sa_set_termios(struct tty_struct *tty, | |||
382 | if ((old_cflag & CBAUD) == B0) { | 382 | if ((old_cflag & CBAUD) == B0) { |
383 | control_state |= (TIOCM_DTR|TIOCM_RTS); | 383 | control_state |= (TIOCM_DTR|TIOCM_RTS); |
384 | if (BSA_USB_CMD(BELKIN_SA_SET_DTR_REQUEST, 1) < 0) | 384 | if (BSA_USB_CMD(BELKIN_SA_SET_DTR_REQUEST, 1) < 0) |
385 | err("Set DTR error"); | 385 | dev_err(&port->dev, "Set DTR error\n"); |
386 | /* don't set RTS if using hardware flow control */ | 386 | /* don't set RTS if using hardware flow control */ |
387 | if (!(old_cflag & CRTSCTS)) | 387 | if (!(old_cflag & CRTSCTS)) |
388 | if (BSA_USB_CMD(BELKIN_SA_SET_RTS_REQUEST | 388 | if (BSA_USB_CMD(BELKIN_SA_SET_RTS_REQUEST |
389 | , 1) < 0) | 389 | , 1) < 0) |
390 | err("Set RTS error"); | 390 | dev_err(&port->dev, "Set RTS error\n"); |
391 | } | 391 | } |
392 | } | 392 | } |
393 | 393 | ||
@@ -403,18 +403,18 @@ static void belkin_sa_set_termios(struct tty_struct *tty, | |||
403 | /* Report the actual baud rate back to the caller */ | 403 | /* Report the actual baud rate back to the caller */ |
404 | tty_encode_baud_rate(tty, baud, baud); | 404 | tty_encode_baud_rate(tty, baud, baud); |
405 | if (BSA_USB_CMD(BELKIN_SA_SET_BAUDRATE_REQUEST, urb_value) < 0) | 405 | if (BSA_USB_CMD(BELKIN_SA_SET_BAUDRATE_REQUEST, urb_value) < 0) |
406 | err("Set baudrate error"); | 406 | dev_err(&port->dev, "Set baudrate error\n"); |
407 | } else { | 407 | } else { |
408 | /* Disable flow control */ | 408 | /* Disable flow control */ |
409 | if (BSA_USB_CMD(BELKIN_SA_SET_FLOW_CTRL_REQUEST, | 409 | if (BSA_USB_CMD(BELKIN_SA_SET_FLOW_CTRL_REQUEST, |
410 | BELKIN_SA_FLOW_NONE) < 0) | 410 | BELKIN_SA_FLOW_NONE) < 0) |
411 | err("Disable flowcontrol error"); | 411 | dev_err(&port->dev, "Disable flowcontrol error\n"); |
412 | /* Drop RTS and DTR */ | 412 | /* Drop RTS and DTR */ |
413 | control_state &= ~(TIOCM_DTR | TIOCM_RTS); | 413 | control_state &= ~(TIOCM_DTR | TIOCM_RTS); |
414 | if (BSA_USB_CMD(BELKIN_SA_SET_DTR_REQUEST, 0) < 0) | 414 | if (BSA_USB_CMD(BELKIN_SA_SET_DTR_REQUEST, 0) < 0) |
415 | err("DTR LOW error"); | 415 | dev_err(&port->dev, "DTR LOW error\n"); |
416 | if (BSA_USB_CMD(BELKIN_SA_SET_RTS_REQUEST, 0) < 0) | 416 | if (BSA_USB_CMD(BELKIN_SA_SET_RTS_REQUEST, 0) < 0) |
417 | err("RTS LOW error"); | 417 | dev_err(&port->dev, "RTS LOW error\n"); |
418 | } | 418 | } |
419 | 419 | ||
420 | /* set the parity */ | 420 | /* set the parity */ |
@@ -425,7 +425,7 @@ static void belkin_sa_set_termios(struct tty_struct *tty, | |||
425 | else | 425 | else |
426 | urb_value = BELKIN_SA_PARITY_NONE; | 426 | urb_value = BELKIN_SA_PARITY_NONE; |
427 | if (BSA_USB_CMD(BELKIN_SA_SET_PARITY_REQUEST, urb_value) < 0) | 427 | if (BSA_USB_CMD(BELKIN_SA_SET_PARITY_REQUEST, urb_value) < 0) |
428 | err("Set parity error"); | 428 | dev_err(&port->dev, "Set parity error\n"); |
429 | } | 429 | } |
430 | 430 | ||
431 | /* set the number of data bits */ | 431 | /* set the number of data bits */ |
@@ -448,7 +448,7 @@ static void belkin_sa_set_termios(struct tty_struct *tty, | |||
448 | break; | 448 | break; |
449 | } | 449 | } |
450 | if (BSA_USB_CMD(BELKIN_SA_SET_DATA_BITS_REQUEST, urb_value) < 0) | 450 | if (BSA_USB_CMD(BELKIN_SA_SET_DATA_BITS_REQUEST, urb_value) < 0) |
451 | err("Set data bits error"); | 451 | dev_err(&port->dev, "Set data bits error\n"); |
452 | } | 452 | } |
453 | 453 | ||
454 | /* set the number of stop bits */ | 454 | /* set the number of stop bits */ |
@@ -457,7 +457,7 @@ static void belkin_sa_set_termios(struct tty_struct *tty, | |||
457 | : BELKIN_SA_STOP_BITS(1); | 457 | : BELKIN_SA_STOP_BITS(1); |
458 | if (BSA_USB_CMD(BELKIN_SA_SET_STOP_BITS_REQUEST, | 458 | if (BSA_USB_CMD(BELKIN_SA_SET_STOP_BITS_REQUEST, |
459 | urb_value) < 0) | 459 | urb_value) < 0) |
460 | err("Set stop bits error"); | 460 | dev_err(&port->dev, "Set stop bits error\n"); |
461 | } | 461 | } |
462 | 462 | ||
463 | /* Set flow control */ | 463 | /* Set flow control */ |
@@ -478,7 +478,7 @@ static void belkin_sa_set_termios(struct tty_struct *tty, | |||
478 | urb_value &= ~(BELKIN_SA_FLOW_IRTS); | 478 | urb_value &= ~(BELKIN_SA_FLOW_IRTS); |
479 | 479 | ||
480 | if (BSA_USB_CMD(BELKIN_SA_SET_FLOW_CTRL_REQUEST, urb_value) < 0) | 480 | if (BSA_USB_CMD(BELKIN_SA_SET_FLOW_CTRL_REQUEST, urb_value) < 0) |
481 | err("Set flow control error"); | 481 | dev_err(&port->dev, "Set flow control error\n"); |
482 | } | 482 | } |
483 | 483 | ||
484 | /* save off the modified port settings */ | 484 | /* save off the modified port settings */ |
@@ -494,7 +494,7 @@ static void belkin_sa_break_ctl(struct tty_struct *tty, int break_state) | |||
494 | struct usb_serial *serial = port->serial; | 494 | struct usb_serial *serial = port->serial; |
495 | 495 | ||
496 | if (BSA_USB_CMD(BELKIN_SA_SET_BREAK_REQUEST, break_state ? 1 : 0) < 0) | 496 | if (BSA_USB_CMD(BELKIN_SA_SET_BREAK_REQUEST, break_state ? 1 : 0) < 0) |
497 | err("Set break_ctl %d", break_state); | 497 | dev_err(&port->dev, "Set break_ctl %d\n", break_state); |
498 | } | 498 | } |
499 | 499 | ||
500 | 500 | ||
@@ -554,13 +554,13 @@ static int belkin_sa_tiocmset(struct tty_struct *tty, struct file *file, | |||
554 | 554 | ||
555 | retval = BSA_USB_CMD(BELKIN_SA_SET_RTS_REQUEST, rts); | 555 | retval = BSA_USB_CMD(BELKIN_SA_SET_RTS_REQUEST, rts); |
556 | if (retval < 0) { | 556 | if (retval < 0) { |
557 | err("Set RTS error %d", retval); | 557 | dev_err(&port->dev, "Set RTS error %d\n", retval); |
558 | goto exit; | 558 | goto exit; |
559 | } | 559 | } |
560 | 560 | ||
561 | retval = BSA_USB_CMD(BELKIN_SA_SET_DTR_REQUEST, dtr); | 561 | retval = BSA_USB_CMD(BELKIN_SA_SET_DTR_REQUEST, dtr); |
562 | if (retval < 0) { | 562 | if (retval < 0) { |
563 | err("Set DTR error %d", retval); | 563 | dev_err(&port->dev, "Set DTR error %d\n", retval); |
564 | goto exit; | 564 | goto exit; |
565 | } | 565 | } |
566 | exit: | 566 | exit: |
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 068680f9929d..858bdd038fbc 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c | |||
@@ -141,7 +141,8 @@ static int cyberjack_startup(struct usb_serial *serial) | |||
141 | result = usb_submit_urb(serial->port[i]->interrupt_in_urb, | 141 | result = usb_submit_urb(serial->port[i]->interrupt_in_urb, |
142 | GFP_KERNEL); | 142 | GFP_KERNEL); |
143 | if (result) | 143 | if (result) |
144 | err(" usb_submit_urb(read int) failed"); | 144 | dev_err(&serial->dev->dev, |
145 | "usb_submit_urb(read int) failed\n"); | ||
145 | dbg("%s - usb_submit_urb(int urb)", __func__); | 146 | dbg("%s - usb_submit_urb(int urb)", __func__); |
146 | } | 147 | } |
147 | 148 | ||
@@ -274,8 +275,9 @@ static int cyberjack_write(struct tty_struct *tty, | |||
274 | /* send the data out the bulk port */ | 275 | /* send the data out the bulk port */ |
275 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 276 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
276 | if (result) { | 277 | if (result) { |
277 | err("%s - failed submitting write urb, error %d", | 278 | dev_err(&port->dev, |
278 | __func__, result); | 279 | "%s - failed submitting write urb, error %d", |
280 | __func__, result); | ||
279 | /* Throw away data. No better idea what to do with it. */ | 281 | /* Throw away data. No better idea what to do with it. */ |
280 | priv->wrfilled = 0; | 282 | priv->wrfilled = 0; |
281 | priv->wrsent = 0; | 283 | priv->wrsent = 0; |
@@ -351,7 +353,9 @@ static void cyberjack_read_int_callback(struct urb *urb) | |||
351 | port->read_urb->dev = port->serial->dev; | 353 | port->read_urb->dev = port->serial->dev; |
352 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 354 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); |
353 | if (result) | 355 | if (result) |
354 | err("%s - failed resubmitting read urb, error %d", __func__, result); | 356 | dev_err(&port->dev, "%s - failed resubmitting " |
357 | "read urb, error %d\n", | ||
358 | __func__, result); | ||
355 | dbg("%s - usb_submit_urb(read urb)", __func__); | 359 | dbg("%s - usb_submit_urb(read urb)", __func__); |
356 | } | 360 | } |
357 | } | 361 | } |
@@ -360,7 +364,7 @@ resubmit: | |||
360 | port->interrupt_in_urb->dev = port->serial->dev; | 364 | port->interrupt_in_urb->dev = port->serial->dev; |
361 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); | 365 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); |
362 | if (result) | 366 | if (result) |
363 | err(" usb_submit_urb(read int) failed"); | 367 | dev_err(&port->dev, "usb_submit_urb(read int) failed\n"); |
364 | dbg("%s - usb_submit_urb(int urb)", __func__); | 368 | dbg("%s - usb_submit_urb(int urb)", __func__); |
365 | } | 369 | } |
366 | 370 | ||
@@ -414,8 +418,8 @@ static void cyberjack_read_bulk_callback(struct urb *urb) | |||
414 | port->read_urb->dev = port->serial->dev; | 418 | port->read_urb->dev = port->serial->dev; |
415 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 419 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); |
416 | if (result) | 420 | if (result) |
417 | err("%s - failed resubmitting read urb, error %d", | 421 | dev_err(&port->dev, "%s - failed resubmitting read " |
418 | __func__, result); | 422 | "urb, error %d\n", __func__, result); |
419 | dbg("%s - usb_submit_urb(read urb)", __func__); | 423 | dbg("%s - usb_submit_urb(read urb)", __func__); |
420 | } | 424 | } |
421 | } | 425 | } |
@@ -462,8 +466,9 @@ static void cyberjack_write_bulk_callback(struct urb *urb) | |||
462 | /* send the data out the bulk port */ | 466 | /* send the data out the bulk port */ |
463 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 467 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
464 | if (result) { | 468 | if (result) { |
465 | err("%s - failed submitting write urb, error %d", | 469 | dev_err(&port->dev, |
466 | __func__, result); | 470 | "%s - failed submitting write urb, error %d\n", |
471 | __func__, result); | ||
467 | /* Throw away data. No better idea what to do with it. */ | 472 | /* Throw away data. No better idea what to do with it. */ |
468 | priv->wrfilled = 0; | 473 | priv->wrfilled = 0; |
469 | priv->wrsent = 0; | 474 | priv->wrsent = 0; |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index e0ca809f75f5..eae4740d448c 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -404,8 +404,8 @@ static int cypress_serial_control(struct tty_struct *tty, | |||
404 | retval != -ENODEV); | 404 | retval != -ENODEV); |
405 | 405 | ||
406 | if (retval != sizeof(feature_buffer)) { | 406 | if (retval != sizeof(feature_buffer)) { |
407 | err("%s - failed sending serial line settings - %d", | 407 | dev_err(&port->dev, "%s - failed sending serial " |
408 | __func__, retval); | 408 | "line settings - %d\n", __func__, retval); |
409 | cypress_set_dead(port); | 409 | cypress_set_dead(port); |
410 | } else { | 410 | } else { |
411 | spin_lock_irqsave(&priv->lock, flags); | 411 | spin_lock_irqsave(&priv->lock, flags); |
@@ -443,7 +443,8 @@ static int cypress_serial_control(struct tty_struct *tty, | |||
443 | && retval != -ENODEV); | 443 | && retval != -ENODEV); |
444 | 444 | ||
445 | if (retval != sizeof(feature_buffer)) { | 445 | if (retval != sizeof(feature_buffer)) { |
446 | err("%s - failed to retrieve serial line settings - %d", __func__, retval); | 446 | dev_err(&port->dev, "%s - failed to retrieve serial " |
447 | "line settings - %d\n", __func__, retval); | ||
447 | cypress_set_dead(port); | 448 | cypress_set_dead(port); |
448 | return retval; | 449 | return retval; |
449 | } else { | 450 | } else { |
@@ -476,8 +477,8 @@ static void cypress_set_dead(struct usb_serial_port *port) | |||
476 | priv->comm_is_ok = 0; | 477 | priv->comm_is_ok = 0; |
477 | spin_unlock_irqrestore(&priv->lock, flags); | 478 | spin_unlock_irqrestore(&priv->lock, flags); |
478 | 479 | ||
479 | err("cypress_m8 suspending failing port %d - interval might be too short", | 480 | dev_err(&port->dev, "cypress_m8 suspending failing port %d - " |
480 | port->number); | 481 | "interval might be too short\n", port->number); |
481 | } | 482 | } |
482 | 483 | ||
483 | 484 | ||
@@ -679,7 +680,8 @@ static int cypress_open(struct tty_struct *tty, | |||
679 | 680 | ||
680 | /* setup the port and start reading from the device */ | 681 | /* setup the port and start reading from the device */ |
681 | if (!port->interrupt_in_urb) { | 682 | if (!port->interrupt_in_urb) { |
682 | err("%s - interrupt_in_urb is empty!", __func__); | 683 | dev_err(&port->dev, "%s - interrupt_in_urb is empty!\n", |
684 | __func__); | ||
683 | return -1; | 685 | return -1; |
684 | } | 686 | } |
685 | 687 | ||
@@ -1107,8 +1109,8 @@ static void cypress_set_termios(struct tty_struct *tty, | |||
1107 | data_bits = 3; | 1109 | data_bits = 3; |
1108 | break; | 1110 | break; |
1109 | default: | 1111 | default: |
1110 | err("%s - CSIZE was set, but not CS5-CS8", | 1112 | dev_err(&port->dev, "%s - CSIZE was set, but not CS5-CS8\n", |
1111 | __func__); | 1113 | __func__); |
1112 | data_bits = 3; | 1114 | data_bits = 3; |
1113 | } | 1115 | } |
1114 | spin_lock_irqsave(&priv->lock, flags); | 1116 | spin_lock_irqsave(&priv->lock, flags); |
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index ebc2918719a0..69f84f0ea6fe 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -661,7 +661,8 @@ static int digi_write_oob_command(struct usb_serial_port *port, | |||
661 | } | 661 | } |
662 | spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags); | 662 | spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags); |
663 | if (ret) | 663 | if (ret) |
664 | err("%s: usb_submit_urb failed, ret=%d", __func__, ret); | 664 | dev_err(&port->dev, "%s: usb_submit_urb failed, ret=%d\n", |
665 | __func__, ret); | ||
665 | return ret; | 666 | return ret; |
666 | 667 | ||
667 | } | 668 | } |
@@ -743,7 +744,8 @@ static int digi_write_inb_command(struct usb_serial_port *port, | |||
743 | spin_unlock_irqrestore(&priv->dp_port_lock, flags); | 744 | spin_unlock_irqrestore(&priv->dp_port_lock, flags); |
744 | 745 | ||
745 | if (ret) | 746 | if (ret) |
746 | err("%s: usb_submit_urb failed, ret=%d, port=%d", | 747 | dev_err(&port->dev, |
748 | "%s: usb_submit_urb failed, ret=%d, port=%d\n", | ||
747 | __func__, ret, priv->dp_port_num); | 749 | __func__, ret, priv->dp_port_num); |
748 | return ret; | 750 | return ret; |
749 | } | 751 | } |
@@ -812,7 +814,8 @@ static int digi_set_modem_signals(struct usb_serial_port *port, | |||
812 | spin_unlock(&port_priv->dp_port_lock); | 814 | spin_unlock(&port_priv->dp_port_lock); |
813 | spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags); | 815 | spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags); |
814 | if (ret) | 816 | if (ret) |
815 | err("%s: usb_submit_urb failed, ret=%d", __func__, ret); | 817 | dev_err(&port->dev, "%s: usb_submit_urb failed, ret=%d\n", |
818 | __func__, ret); | ||
816 | return ret; | 819 | return ret; |
817 | } | 820 | } |
818 | 821 | ||
@@ -907,7 +910,8 @@ static void digi_rx_unthrottle(struct tty_struct *tty) | |||
907 | spin_unlock_irqrestore(&priv->dp_port_lock, flags); | 910 | spin_unlock_irqrestore(&priv->dp_port_lock, flags); |
908 | 911 | ||
909 | if (ret) | 912 | if (ret) |
910 | err("%s: usb_submit_urb failed, ret=%d, port=%d", | 913 | dev_err(&port->dev, |
914 | "%s: usb_submit_urb failed, ret=%d, port=%d\n", | ||
911 | __func__, ret, priv->dp_port_num); | 915 | __func__, ret, priv->dp_port_num); |
912 | } | 916 | } |
913 | 917 | ||
@@ -1214,7 +1218,8 @@ static int digi_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
1214 | /* return length of new data written, or error */ | 1218 | /* return length of new data written, or error */ |
1215 | spin_unlock_irqrestore(&priv->dp_port_lock, flags); | 1219 | spin_unlock_irqrestore(&priv->dp_port_lock, flags); |
1216 | if (ret < 0) | 1220 | if (ret < 0) |
1217 | err("%s: usb_submit_urb failed, ret=%d, port=%d", | 1221 | dev_err(&port->dev, |
1222 | "%s: usb_submit_urb failed, ret=%d, port=%d\n", | ||
1218 | __func__, ret, priv->dp_port_num); | 1223 | __func__, ret, priv->dp_port_num); |
1219 | dbg("digi_write: returning %d", ret); | 1224 | dbg("digi_write: returning %d", ret); |
1220 | return ret; | 1225 | return ret; |
@@ -1235,14 +1240,16 @@ static void digi_write_bulk_callback(struct urb *urb) | |||
1235 | 1240 | ||
1236 | /* port and serial sanity check */ | 1241 | /* port and serial sanity check */ |
1237 | if (port == NULL || (priv = usb_get_serial_port_data(port)) == NULL) { | 1242 | if (port == NULL || (priv = usb_get_serial_port_data(port)) == NULL) { |
1238 | err("%s: port or port->private is NULL, status=%d", | 1243 | dev_err(&port->dev, |
1239 | __func__, status); | 1244 | "%s: port or port->private is NULL, status=%d\n", |
1245 | __func__, status); | ||
1240 | return; | 1246 | return; |
1241 | } | 1247 | } |
1242 | serial = port->serial; | 1248 | serial = port->serial; |
1243 | if (serial == NULL || (serial_priv = usb_get_serial_data(serial)) == NULL) { | 1249 | if (serial == NULL || (serial_priv = usb_get_serial_data(serial)) == NULL) { |
1244 | err("%s: serial or serial->private is NULL, status=%d", | 1250 | dev_err(&port->dev, |
1245 | __func__, status); | 1251 | "%s: serial or serial->private is NULL, status=%d\n", |
1252 | __func__, status); | ||
1246 | return; | 1253 | return; |
1247 | } | 1254 | } |
1248 | 1255 | ||
@@ -1284,7 +1291,8 @@ static void digi_write_bulk_callback(struct urb *urb) | |||
1284 | 1291 | ||
1285 | spin_unlock(&priv->dp_port_lock); | 1292 | spin_unlock(&priv->dp_port_lock); |
1286 | if (ret) | 1293 | if (ret) |
1287 | err("%s: usb_submit_urb failed, ret=%d, port=%d", | 1294 | dev_err(&port->dev, |
1295 | "%s: usb_submit_urb failed, ret=%d, port=%d\n", | ||
1288 | __func__, ret, priv->dp_port_num); | 1296 | __func__, ret, priv->dp_port_num); |
1289 | } | 1297 | } |
1290 | 1298 | ||
@@ -1518,8 +1526,9 @@ static int digi_startup_device(struct usb_serial *serial) | |||
1518 | port->write_urb->dev = port->serial->dev; | 1526 | port->write_urb->dev = port->serial->dev; |
1519 | ret = usb_submit_urb(port->read_urb, GFP_KERNEL); | 1527 | ret = usb_submit_urb(port->read_urb, GFP_KERNEL); |
1520 | if (ret != 0) { | 1528 | if (ret != 0) { |
1521 | err("%s: usb_submit_urb failed, ret=%d, port=%d", | 1529 | dev_err(&port->dev, |
1522 | __func__, ret, i); | 1530 | "%s: usb_submit_urb failed, ret=%d, port=%d\n", |
1531 | __func__, ret, i); | ||
1523 | break; | 1532 | break; |
1524 | } | 1533 | } |
1525 | } | 1534 | } |
@@ -1618,22 +1627,26 @@ static void digi_read_bulk_callback(struct urb *urb) | |||
1618 | dbg("digi_read_bulk_callback: TOP"); | 1627 | dbg("digi_read_bulk_callback: TOP"); |
1619 | 1628 | ||
1620 | /* port sanity check, do not resubmit if port is not valid */ | 1629 | /* port sanity check, do not resubmit if port is not valid */ |
1621 | if (port == NULL || (priv = usb_get_serial_port_data(port)) == NULL) { | 1630 | if (port == NULL) |
1622 | err("%s: port or port->private is NULL, status=%d", | 1631 | return; |
1623 | __func__, status); | 1632 | priv = usb_get_serial_port_data(port); |
1633 | if (priv == NULL) { | ||
1634 | dev_err(&port->dev, "%s: port->private is NULL, status=%d\n", | ||
1635 | __func__, status); | ||
1624 | return; | 1636 | return; |
1625 | } | 1637 | } |
1626 | if (port->serial == NULL || | 1638 | if (port->serial == NULL || |
1627 | (serial_priv = usb_get_serial_data(port->serial)) == NULL) { | 1639 | (serial_priv = usb_get_serial_data(port->serial)) == NULL) { |
1628 | err("%s: serial is bad or serial->private is NULL, status=%d", | 1640 | dev_err(&port->dev, "%s: serial is bad or serial->private " |
1629 | __func__, status); | 1641 | "is NULL, status=%d\n", __func__, status); |
1630 | return; | 1642 | return; |
1631 | } | 1643 | } |
1632 | 1644 | ||
1633 | /* do not resubmit urb if it has any status error */ | 1645 | /* do not resubmit urb if it has any status error */ |
1634 | if (status) { | 1646 | if (status) { |
1635 | err("%s: nonzero read bulk status: status=%d, port=%d", | 1647 | dev_err(&port->dev, |
1636 | __func__, status, priv->dp_port_num); | 1648 | "%s: nonzero read bulk status: status=%d, port=%d\n", |
1649 | __func__, status, priv->dp_port_num); | ||
1637 | return; | 1650 | return; |
1638 | } | 1651 | } |
1639 | 1652 | ||
@@ -1650,8 +1663,9 @@ static void digi_read_bulk_callback(struct urb *urb) | |||
1650 | urb->dev = port->serial->dev; | 1663 | urb->dev = port->serial->dev; |
1651 | ret = usb_submit_urb(urb, GFP_ATOMIC); | 1664 | ret = usb_submit_urb(urb, GFP_ATOMIC); |
1652 | if (ret != 0) { | 1665 | if (ret != 0) { |
1653 | err("%s: failed resubmitting urb, ret=%d, port=%d", | 1666 | dev_err(&port->dev, |
1654 | __func__, ret, priv->dp_port_num); | 1667 | "%s: failed resubmitting urb, ret=%d, port=%d\n", |
1668 | __func__, ret, priv->dp_port_num); | ||
1655 | } | 1669 | } |
1656 | 1670 | ||
1657 | } | 1671 | } |
@@ -1687,10 +1701,11 @@ static int digi_read_inb_callback(struct urb *urb) | |||
1687 | 1701 | ||
1688 | /* short/multiple packet check */ | 1702 | /* short/multiple packet check */ |
1689 | if (urb->actual_length != len + 2) { | 1703 | if (urb->actual_length != len + 2) { |
1690 | err("%s: INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, " | 1704 | dev_err(&port->dev, "%s: INCOMPLETE OR MULTIPLE PACKET, " |
1691 | "port=%d, opcode=%d, len=%d, actual_length=%d, " | 1705 | "urb->status=%d, port=%d, opcode=%d, len=%d, " |
1692 | "status=%d", __func__, status, priv->dp_port_num, | 1706 | "actual_length=%d, status=%d\n", __func__, status, |
1693 | opcode, len, urb->actual_length, port_status); | 1707 | priv->dp_port_num, opcode, len, urb->actual_length, |
1708 | port_status); | ||
1694 | return -1; | 1709 | return -1; |
1695 | } | 1710 | } |
1696 | 1711 | ||
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index fdd28e940bc1..8a69cce40b6d 100644 --- a/drivers/usb/serial/empeg.c +++ b/drivers/usb/serial/empeg.c | |||
@@ -416,7 +416,7 @@ static int empeg_startup(struct usb_serial *serial) | |||
416 | dbg("%s", __func__); | 416 | dbg("%s", __func__); |
417 | 417 | ||
418 | if (serial->dev->actconfig->desc.bConfigurationValue != 1) { | 418 | if (serial->dev->actconfig->desc.bConfigurationValue != 1) { |
419 | err("active config #%d != 1 ??", | 419 | dev_err(&serial->dev->dev, "active config #%d != 1 ??\n", |
420 | serial->dev->actconfig->desc.bConfigurationValue); | 420 | serial->dev->actconfig->desc.bConfigurationValue); |
421 | return -ENODEV; | 421 | return -ENODEV; |
422 | } | 422 | } |
@@ -499,15 +499,15 @@ static int __init empeg_init(void) | |||
499 | urb = usb_alloc_urb(0, GFP_KERNEL); | 499 | urb = usb_alloc_urb(0, GFP_KERNEL); |
500 | write_urb_pool[i] = urb; | 500 | write_urb_pool[i] = urb; |
501 | if (urb == NULL) { | 501 | if (urb == NULL) { |
502 | err("No more urbs???"); | 502 | printk(KERN_ERR "empeg: No more urbs???\n"); |
503 | continue; | 503 | continue; |
504 | } | 504 | } |
505 | 505 | ||
506 | urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, | 506 | urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, |
507 | GFP_KERNEL); | 507 | GFP_KERNEL); |
508 | if (!urb->transfer_buffer) { | 508 | if (!urb->transfer_buffer) { |
509 | err("%s - out of memory for urb buffers.", | 509 | printk(KERN_ERR "empeg: %s - out of memory for urb " |
510 | __func__); | 510 | "buffers.", __func__); |
511 | continue; | 511 | continue; |
512 | } | 512 | } |
513 | } | 513 | } |
diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c index 711e84f6ed82..3cfc762f5056 100644 --- a/drivers/usb/serial/ezusb.c +++ b/drivers/usb/serial/ezusb.c | |||
@@ -28,7 +28,8 @@ int ezusb_writememory(struct usb_serial *serial, int address, | |||
28 | 28 | ||
29 | /* dbg("ezusb_writememory %x, %d", address, length); */ | 29 | /* dbg("ezusb_writememory %x, %d", address, length); */ |
30 | if (!serial->dev) { | 30 | if (!serial->dev) { |
31 | err("%s - no physical device present, failing.", __func__); | 31 | printk(KERN_ERR "ezusb: %s - no physical device present, " |
32 | "failing.\n", __func__); | ||
32 | return -ENODEV; | 33 | return -ENODEV; |
33 | } | 34 | } |
34 | 35 | ||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index bcadb1f4f5dd..51d7bdea2869 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -1327,7 +1327,7 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) | |||
1327 | 1327 | ||
1328 | priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL); | 1328 | priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL); |
1329 | if (!priv) { | 1329 | if (!priv) { |
1330 | err("%s- kmalloc(%Zd) failed.", __func__, | 1330 | dev_err(&port->dev, "%s- kmalloc(%Zd) failed.\n", __func__, |
1331 | sizeof(struct ftdi_private)); | 1331 | sizeof(struct ftdi_private)); |
1332 | return -ENOMEM; | 1332 | return -ENOMEM; |
1333 | } | 1333 | } |
@@ -1524,8 +1524,9 @@ static int ftdi_open(struct tty_struct *tty, | |||
1524 | ftdi_read_bulk_callback, port); | 1524 | ftdi_read_bulk_callback, port); |
1525 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); | 1525 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); |
1526 | if (result) | 1526 | if (result) |
1527 | err("%s - failed submitting read urb, error %d", | 1527 | dev_err(&port->dev, |
1528 | __func__, result); | 1528 | "%s - failed submitting read urb, error %d\n", |
1529 | __func__, result); | ||
1529 | 1530 | ||
1530 | 1531 | ||
1531 | return result; | 1532 | return result; |
@@ -1559,7 +1560,7 @@ static void ftdi_close(struct tty_struct *tty, | |||
1559 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, | 1560 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, |
1560 | 0, priv->interface, buf, 0, | 1561 | 0, priv->interface, buf, 0, |
1561 | WDR_TIMEOUT) < 0) { | 1562 | WDR_TIMEOUT) < 0) { |
1562 | err("error from flowcontrol urb"); | 1563 | dev_err(&port->dev, "error from flowcontrol urb\n"); |
1563 | } | 1564 | } |
1564 | 1565 | ||
1565 | /* drop RTS and DTR */ | 1566 | /* drop RTS and DTR */ |
@@ -1624,14 +1625,15 @@ static int ftdi_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
1624 | 1625 | ||
1625 | buffer = kmalloc(transfer_size, GFP_ATOMIC); | 1626 | buffer = kmalloc(transfer_size, GFP_ATOMIC); |
1626 | if (!buffer) { | 1627 | if (!buffer) { |
1627 | err("%s ran out of kernel memory for urb ...", __func__); | 1628 | dev_err(&port->dev, |
1629 | "%s ran out of kernel memory for urb ...\n", __func__); | ||
1628 | count = -ENOMEM; | 1630 | count = -ENOMEM; |
1629 | goto error_no_buffer; | 1631 | goto error_no_buffer; |
1630 | } | 1632 | } |
1631 | 1633 | ||
1632 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 1634 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
1633 | if (!urb) { | 1635 | if (!urb) { |
1634 | err("%s - no more free urbs", __func__); | 1636 | dev_err(&port->dev, "%s - no more free urbs\n", __func__); |
1635 | count = -ENOMEM; | 1637 | count = -ENOMEM; |
1636 | goto error_no_urb; | 1638 | goto error_no_urb; |
1637 | } | 1639 | } |
@@ -1675,8 +1677,9 @@ static int ftdi_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
1675 | 1677 | ||
1676 | status = usb_submit_urb(urb, GFP_ATOMIC); | 1678 | status = usb_submit_urb(urb, GFP_ATOMIC); |
1677 | if (status) { | 1679 | if (status) { |
1678 | err("%s - failed submitting write urb, error %d", | 1680 | dev_err(&port->dev, |
1679 | __func__, status); | 1681 | "%s - failed submitting write urb, error %d\n", |
1682 | __func__, status); | ||
1680 | count = status; | 1683 | count = status; |
1681 | goto error; | 1684 | goto error; |
1682 | } else { | 1685 | } else { |
@@ -1783,7 +1786,8 @@ static int ftdi_chars_in_buffer(struct tty_struct *tty) | |||
1783 | buffered = (int)priv->tx_outstanding_bytes; | 1786 | buffered = (int)priv->tx_outstanding_bytes; |
1784 | spin_unlock_irqrestore(&priv->tx_lock, flags); | 1787 | spin_unlock_irqrestore(&priv->tx_lock, flags); |
1785 | if (buffered < 0) { | 1788 | if (buffered < 0) { |
1786 | err("%s outstanding tx bytes is negative!", __func__); | 1789 | dev_err(&port->dev, "%s outstanding tx bytes is negative!\n", |
1790 | __func__); | ||
1787 | buffered = 0; | 1791 | buffered = 0; |
1788 | } | 1792 | } |
1789 | return buffered; | 1793 | return buffered; |
@@ -1799,11 +1803,12 @@ static void ftdi_read_bulk_callback(struct urb *urb) | |||
1799 | int status = urb->status; | 1803 | int status = urb->status; |
1800 | 1804 | ||
1801 | if (urb->number_of_packets > 0) { | 1805 | if (urb->number_of_packets > 0) { |
1802 | err("%s transfer_buffer_length %d actual_length %d number of packets %d", | 1806 | dev_err(&port->dev, "%s transfer_buffer_length %d " |
1803 | __func__, | 1807 | "actual_length %d number of packets %d\n", __func__, |
1804 | urb->transfer_buffer_length, | 1808 | urb->transfer_buffer_length, |
1805 | urb->actual_length, urb->number_of_packets); | 1809 | urb->actual_length, urb->number_of_packets); |
1806 | err("%s transfer_flags %x ", __func__, urb->transfer_flags); | 1810 | dev_err(&port->dev, "%s transfer_flags %x\n", __func__, |
1811 | urb->transfer_flags); | ||
1807 | } | 1812 | } |
1808 | 1813 | ||
1809 | dbg("%s - port %d", __func__, port->number); | 1814 | dbg("%s - port %d", __func__, port->number); |
@@ -1824,7 +1829,7 @@ static void ftdi_read_bulk_callback(struct urb *urb) | |||
1824 | } | 1829 | } |
1825 | 1830 | ||
1826 | if (urb != port->read_urb) | 1831 | if (urb != port->read_urb) |
1827 | err("%s - Not my urb!", __func__); | 1832 | dev_err(&port->dev, "%s - Not my urb!\n", __func__); |
1828 | 1833 | ||
1829 | if (status) { | 1834 | if (status) { |
1830 | /* This will happen at close every time so it is a dbg not an | 1835 | /* This will happen at close every time so it is a dbg not an |
@@ -1927,7 +1932,8 @@ static void ftdi_process_read(struct work_struct *work) | |||
1927 | 1932 | ||
1928 | length = min(PKTSZ, urb->actual_length-packet_offset)-2; | 1933 | length = min(PKTSZ, urb->actual_length-packet_offset)-2; |
1929 | if (length < 0) { | 1934 | if (length < 0) { |
1930 | err("%s - bad packet length: %d", __func__, length+2); | 1935 | dev_err(&port->dev, "%s - bad packet length: %d\n", |
1936 | __func__, length+2); | ||
1931 | length = 0; | 1937 | length = 0; |
1932 | } | 1938 | } |
1933 | 1939 | ||
@@ -2042,8 +2048,9 @@ static void ftdi_process_read(struct work_struct *work) | |||
2042 | 2048 | ||
2043 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 2049 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); |
2044 | if (result) | 2050 | if (result) |
2045 | err("%s - failed resubmitting read urb, error %d", | 2051 | dev_err(&port->dev, |
2046 | __func__, result); | 2052 | "%s - failed resubmitting read urb, error %d\n", |
2053 | __func__, result); | ||
2047 | } | 2054 | } |
2048 | out: | 2055 | out: |
2049 | tty_kref_put(tty); | 2056 | tty_kref_put(tty); |
@@ -2072,8 +2079,8 @@ static void ftdi_break_ctl(struct tty_struct *tty, int break_state) | |||
2072 | FTDI_SIO_SET_DATA_REQUEST_TYPE, | 2079 | FTDI_SIO_SET_DATA_REQUEST_TYPE, |
2073 | urb_value , priv->interface, | 2080 | urb_value , priv->interface, |
2074 | buf, 0, WDR_TIMEOUT) < 0) { | 2081 | buf, 0, WDR_TIMEOUT) < 0) { |
2075 | err("%s FAILED to enable/disable break state (state was %d)", | 2082 | dev_err(&port->dev, "%s FAILED to enable/disable break state " |
2076 | __func__, break_state); | 2083 | "(state was %d)\n", __func__, break_state); |
2077 | } | 2084 | } |
2078 | 2085 | ||
2079 | dbg("%s break state is %d - urb is %d", __func__, | 2086 | dbg("%s break state is %d - urb is %d", __func__, |
@@ -2145,7 +2152,7 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2145 | case CS7: urb_value |= 7; dbg("Setting CS7"); break; | 2152 | case CS7: urb_value |= 7; dbg("Setting CS7"); break; |
2146 | case CS8: urb_value |= 8; dbg("Setting CS8"); break; | 2153 | case CS8: urb_value |= 8; dbg("Setting CS8"); break; |
2147 | default: | 2154 | default: |
2148 | err("CSIZE was set but not CS5-CS8"); | 2155 | dev_err(&port->dev, "CSIZE was set but not CS5-CS8\n"); |
2149 | } | 2156 | } |
2150 | } | 2157 | } |
2151 | 2158 | ||
@@ -2158,7 +2165,8 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2158 | FTDI_SIO_SET_DATA_REQUEST_TYPE, | 2165 | FTDI_SIO_SET_DATA_REQUEST_TYPE, |
2159 | urb_value , priv->interface, | 2166 | urb_value , priv->interface, |
2160 | buf, 0, WDR_SHORT_TIMEOUT) < 0) { | 2167 | buf, 0, WDR_SHORT_TIMEOUT) < 0) { |
2161 | err("%s FAILED to set databits/stopbits/parity", __func__); | 2168 | dev_err(&port->dev, "%s FAILED to set " |
2169 | "databits/stopbits/parity\n", __func__); | ||
2162 | } | 2170 | } |
2163 | 2171 | ||
2164 | /* Now do the baudrate */ | 2172 | /* Now do the baudrate */ |
@@ -2169,14 +2177,17 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2169 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, | 2177 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, |
2170 | 0, priv->interface, | 2178 | 0, priv->interface, |
2171 | buf, 0, WDR_TIMEOUT) < 0) { | 2179 | buf, 0, WDR_TIMEOUT) < 0) { |
2172 | err("%s error from disable flowcontrol urb", __func__); | 2180 | dev_err(&port->dev, |
2181 | "%s error from disable flowcontrol urb\n", | ||
2182 | __func__); | ||
2173 | } | 2183 | } |
2174 | /* Drop RTS and DTR */ | 2184 | /* Drop RTS and DTR */ |
2175 | clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); | 2185 | clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); |
2176 | } else { | 2186 | } else { |
2177 | /* set the baudrate determined before */ | 2187 | /* set the baudrate determined before */ |
2178 | if (change_speed(tty, port)) | 2188 | if (change_speed(tty, port)) |
2179 | err("%s urb failed to set baudrate", __func__); | 2189 | dev_err(&port->dev, "%s urb failed to set baudrate\n", |
2190 | __func__); | ||
2180 | /* Ensure RTS and DTR are raised when baudrate changed from 0 */ | 2191 | /* Ensure RTS and DTR are raised when baudrate changed from 0 */ |
2181 | if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) | 2192 | if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) |
2182 | set_mctrl(port, TIOCM_DTR | TIOCM_RTS); | 2193 | set_mctrl(port, TIOCM_DTR | TIOCM_RTS); |
@@ -2192,7 +2203,8 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2192 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, | 2203 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, |
2193 | 0 , (FTDI_SIO_RTS_CTS_HS | priv->interface), | 2204 | 0 , (FTDI_SIO_RTS_CTS_HS | priv->interface), |
2194 | buf, 0, WDR_TIMEOUT) < 0) { | 2205 | buf, 0, WDR_TIMEOUT) < 0) { |
2195 | err("urb failed to set to rts/cts flow control"); | 2206 | dev_err(&port->dev, |
2207 | "urb failed to set to rts/cts flow control\n"); | ||
2196 | } | 2208 | } |
2197 | 2209 | ||
2198 | } else { | 2210 | } else { |
@@ -2223,7 +2235,8 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2223 | urb_value , (FTDI_SIO_XON_XOFF_HS | 2235 | urb_value , (FTDI_SIO_XON_XOFF_HS |
2224 | | priv->interface), | 2236 | | priv->interface), |
2225 | buf, 0, WDR_TIMEOUT) < 0) { | 2237 | buf, 0, WDR_TIMEOUT) < 0) { |
2226 | err("urb failed to set to xon/xoff flow control"); | 2238 | dev_err(&port->dev, "urb failed to set to " |
2239 | "xon/xoff flow control\n"); | ||
2227 | } | 2240 | } |
2228 | } else { | 2241 | } else { |
2229 | /* else clause to only run if cflag ! CRTSCTS and iflag | 2242 | /* else clause to only run if cflag ! CRTSCTS and iflag |
@@ -2236,7 +2249,8 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2236 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, | 2249 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, |
2237 | 0, priv->interface, | 2250 | 0, priv->interface, |
2238 | buf, 0, WDR_TIMEOUT) < 0) { | 2251 | buf, 0, WDR_TIMEOUT) < 0) { |
2239 | err("urb failed to clear flow control"); | 2252 | dev_err(&port->dev, |
2253 | "urb failed to clear flow control\n"); | ||
2240 | } | 2254 | } |
2241 | } | 2255 | } |
2242 | 2256 | ||
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index eb95efdfbe8b..e85c8c0d1ad9 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -3109,13 +3109,13 @@ static int edge_startup(struct usb_serial *serial) | |||
3109 | edge_serial->interrupt_read_urb = | 3109 | edge_serial->interrupt_read_urb = |
3110 | usb_alloc_urb(0, GFP_KERNEL); | 3110 | usb_alloc_urb(0, GFP_KERNEL); |
3111 | if (!edge_serial->interrupt_read_urb) { | 3111 | if (!edge_serial->interrupt_read_urb) { |
3112 | err("out of memory"); | 3112 | dev_err(&dev->dev, "out of memory\n"); |
3113 | return -ENOMEM; | 3113 | return -ENOMEM; |
3114 | } | 3114 | } |
3115 | edge_serial->interrupt_in_buffer = | 3115 | edge_serial->interrupt_in_buffer = |
3116 | kmalloc(buffer_size, GFP_KERNEL); | 3116 | kmalloc(buffer_size, GFP_KERNEL); |
3117 | if (!edge_serial->interrupt_in_buffer) { | 3117 | if (!edge_serial->interrupt_in_buffer) { |
3118 | err("out of memory"); | 3118 | dev_err(&dev->dev, "out of memory\n"); |
3119 | usb_free_urb(edge_serial->interrupt_read_urb); | 3119 | usb_free_urb(edge_serial->interrupt_read_urb); |
3120 | return -ENOMEM; | 3120 | return -ENOMEM; |
3121 | } | 3121 | } |
@@ -3146,13 +3146,13 @@ static int edge_startup(struct usb_serial *serial) | |||
3146 | edge_serial->read_urb = | 3146 | edge_serial->read_urb = |
3147 | usb_alloc_urb(0, GFP_KERNEL); | 3147 | usb_alloc_urb(0, GFP_KERNEL); |
3148 | if (!edge_serial->read_urb) { | 3148 | if (!edge_serial->read_urb) { |
3149 | err("out of memory"); | 3149 | dev_err(&dev->dev, "out of memory\n"); |
3150 | return -ENOMEM; | 3150 | return -ENOMEM; |
3151 | } | 3151 | } |
3152 | edge_serial->bulk_in_buffer = | 3152 | edge_serial->bulk_in_buffer = |
3153 | kmalloc(buffer_size, GFP_KERNEL); | 3153 | kmalloc(buffer_size, GFP_KERNEL); |
3154 | if (!edge_serial->bulk_in_buffer) { | 3154 | if (!edge_serial->bulk_in_buffer) { |
3155 | err("out of memory"); | 3155 | dev_err(&dev->dev, "out of memory\n"); |
3156 | usb_free_urb(edge_serial->read_urb); | 3156 | usb_free_urb(edge_serial->read_urb); |
3157 | return -ENOMEM; | 3157 | return -ENOMEM; |
3158 | } | 3158 | } |
@@ -3181,7 +3181,8 @@ static int edge_startup(struct usb_serial *serial) | |||
3181 | } | 3181 | } |
3182 | 3182 | ||
3183 | if (!interrupt_in_found || !bulk_in_found || !bulk_out_found) { | 3183 | if (!interrupt_in_found || !bulk_in_found || !bulk_out_found) { |
3184 | err("Error - the proper endpoints were not found!"); | 3184 | dev_err(&dev->dev, "Error - the proper endpoints " |
3185 | "were not found!\n"); | ||
3185 | return -ENODEV; | 3186 | return -ENODEV; |
3186 | } | 3187 | } |
3187 | 3188 | ||
@@ -3190,8 +3191,9 @@ static int edge_startup(struct usb_serial *serial) | |||
3190 | response = usb_submit_urb(edge_serial->interrupt_read_urb, | 3191 | response = usb_submit_urb(edge_serial->interrupt_read_urb, |
3191 | GFP_KERNEL); | 3192 | GFP_KERNEL); |
3192 | if (response) | 3193 | if (response) |
3193 | err("%s - Error %d submitting control urb", | 3194 | dev_err(&dev->dev, |
3194 | __func__, response); | 3195 | "%s - Error %d submitting control urb\n", |
3196 | __func__, response); | ||
3195 | } | 3197 | } |
3196 | return response; | 3198 | return response; |
3197 | } | 3199 | } |
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 5108cbc64a55..132be74d2b89 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -608,7 +608,7 @@ static int ipaq_open(struct tty_struct *tty, | |||
608 | bytes_out = 0; | 608 | bytes_out = 0; |
609 | priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL); | 609 | priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL); |
610 | if (priv == NULL) { | 610 | if (priv == NULL) { |
611 | err("%s - Out of memory", __func__); | 611 | dev_err(&port->dev, "%s - Out of memory\n", __func__); |
612 | return -ENOMEM; | 612 | return -ENOMEM; |
613 | } | 613 | } |
614 | usb_set_serial_port_data(port, priv); | 614 | usb_set_serial_port_data(port, priv); |
@@ -693,8 +693,7 @@ static int ipaq_open(struct tty_struct *tty, | |||
693 | } | 693 | } |
694 | 694 | ||
695 | if (!retries && result) { | 695 | if (!retries && result) { |
696 | err("%s - failed doing control urb, error %d", __func__, | 696 | dev_err(&port->dev, "%s - failed doing control urb, error %d\n", __func__, result); |
697 | result); | ||
698 | goto error; | 697 | goto error; |
699 | } | 698 | } |
700 | 699 | ||
@@ -707,8 +706,9 @@ static int ipaq_open(struct tty_struct *tty, | |||
707 | 706 | ||
708 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); | 707 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); |
709 | if (result) { | 708 | if (result) { |
710 | err("%s - failed submitting read urb, error %d", | 709 | dev_err(&port->dev, |
711 | __func__, result); | 710 | "%s - failed submitting read urb, error %d\n", |
711 | __func__, result); | ||
712 | goto error; | 712 | goto error; |
713 | } | 713 | } |
714 | 714 | ||
@@ -716,7 +716,7 @@ static int ipaq_open(struct tty_struct *tty, | |||
716 | 716 | ||
717 | enomem: | 717 | enomem: |
718 | result = -ENOMEM; | 718 | result = -ENOMEM; |
719 | err("%s - Out of memory", __func__); | 719 | dev_err(&port->dev, "%s - Out of memory\n", __func__); |
720 | error: | 720 | error: |
721 | ipaq_destroy_lists(port); | 721 | ipaq_destroy_lists(port); |
722 | kfree(priv); | 722 | kfree(priv); |
@@ -781,8 +781,9 @@ static void ipaq_read_bulk_callback(struct urb *urb) | |||
781 | ipaq_read_bulk_callback, port); | 781 | ipaq_read_bulk_callback, port); |
782 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 782 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); |
783 | if (result) | 783 | if (result) |
784 | err("%s - failed resubmitting read urb, error %d", | 784 | dev_err(&port->dev, |
785 | __func__, result); | 785 | "%s - failed resubmitting read urb, error %d\n", |
786 | __func__, result); | ||
786 | return; | 787 | return; |
787 | } | 788 | } |
788 | 789 | ||
@@ -847,7 +848,8 @@ static int ipaq_write_bulk(struct usb_serial_port *port, | |||
847 | spin_unlock_irqrestore(&write_list_lock, flags); | 848 | spin_unlock_irqrestore(&write_list_lock, flags); |
848 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 849 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
849 | if (result) | 850 | if (result) |
850 | err("%s - failed submitting write urb, error %d", | 851 | dev_err(&port->dev, |
852 | "%s - failed submitting write urb, error %d\n", | ||
851 | __func__, result); | 853 | __func__, result); |
852 | } else { | 854 | } else { |
853 | spin_unlock_irqrestore(&write_list_lock, flags); | 855 | spin_unlock_irqrestore(&write_list_lock, flags); |
@@ -909,8 +911,9 @@ static void ipaq_write_bulk_callback(struct urb *urb) | |||
909 | spin_unlock_irqrestore(&write_list_lock, flags); | 911 | spin_unlock_irqrestore(&write_list_lock, flags); |
910 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 912 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
911 | if (result) | 913 | if (result) |
912 | err("%s - failed submitting write urb, error %d", | 914 | dev_err(&port->dev, |
913 | __func__, result); | 915 | "%s - failed submitting write urb, error %d\n", |
916 | __func__, result); | ||
914 | } else { | 917 | } else { |
915 | priv->active = 0; | 918 | priv->active = 0; |
916 | spin_unlock_irqrestore(&write_list_lock, flags); | 919 | spin_unlock_irqrestore(&write_list_lock, flags); |
@@ -957,7 +960,7 @@ static int ipaq_startup(struct usb_serial *serial) | |||
957 | { | 960 | { |
958 | dbg("%s", __func__); | 961 | dbg("%s", __func__); |
959 | if (serial->dev->actconfig->desc.bConfigurationValue != 1) { | 962 | if (serial->dev->actconfig->desc.bConfigurationValue != 1) { |
960 | err("active config #%d != 1 ??", | 963 | dev_err(&serial->dev->dev, "active config #%d != 1 ??\n", |
961 | serial->dev->actconfig->desc.bConfigurationValue); | 964 | serial->dev->actconfig->desc.bConfigurationValue); |
962 | return -ENODEV; | 965 | return -ENODEV; |
963 | } | 966 | } |
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 2928ba844394..bf1ae247da66 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c | |||
@@ -742,11 +742,13 @@ static int keyspan_pda_fake_startup(struct usb_serial *serial) | |||
742 | fw_name = "keyspan_pda/xircom_pgs.fw"; | 742 | fw_name = "keyspan_pda/xircom_pgs.fw"; |
743 | #endif | 743 | #endif |
744 | else { | 744 | else { |
745 | err("%s: unknown vendor, aborting.", __func__); | 745 | dev_err(&serial->dev->dev, "%s: unknown vendor, aborting.\n", |
746 | __func__); | ||
746 | return -ENODEV; | 747 | return -ENODEV; |
747 | } | 748 | } |
748 | if (request_ihex_firmware(&fw, fw_name, &serial->dev->dev)) { | 749 | if (request_ihex_firmware(&fw, fw_name, &serial->dev->dev)) { |
749 | err("failed to load firmware \"%s\"\n", fw_name); | 750 | dev_err(&serial->dev->dev, "failed to load firmware \"%s\"\n", |
751 | fw_name); | ||
750 | return -ENOENT; | 752 | return -ENOENT; |
751 | } | 753 | } |
752 | record = (const struct ihex_binrec *)fw->data; | 754 | record = (const struct ihex_binrec *)fw->data; |
@@ -756,10 +758,10 @@ static int keyspan_pda_fake_startup(struct usb_serial *serial) | |||
756 | (unsigned char *)record->data, | 758 | (unsigned char *)record->data, |
757 | be16_to_cpu(record->len), 0xa0); | 759 | be16_to_cpu(record->len), 0xa0); |
758 | if (response < 0) { | 760 | if (response < 0) { |
759 | err("ezusb_writememory failed for Keyspan PDA " | 761 | dev_err(&serial->dev->dev, "ezusb_writememory failed " |
760 | "firmware (%d %04X %p %d)", | 762 | "for Keyspan PDA firmware (%d %04X %p %d)\n", |
761 | response, be32_to_cpu(record->addr), | 763 | response, be32_to_cpu(record->addr), |
762 | record->data, be16_to_cpu(record->len)); | 764 | record->data, be16_to_cpu(record->len)); |
763 | break; | 765 | break; |
764 | } | 766 | } |
765 | record = ihex_next_binrec(record); | 767 | record = ihex_next_binrec(record); |
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 | ||
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 29fa66ea2d21..07710cf31d0d 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -246,7 +246,8 @@ static int mct_u232_set_baud_rate(struct tty_struct *tty, | |||
246 | 0, 0, &divisor, MCT_U232_SET_BAUD_RATE_SIZE, | 246 | 0, 0, &divisor, MCT_U232_SET_BAUD_RATE_SIZE, |
247 | WDR_TIMEOUT); | 247 | WDR_TIMEOUT); |
248 | if (rc < 0) /*FIXME: What value speed results */ | 248 | if (rc < 0) /*FIXME: What value speed results */ |
249 | err("Set BAUD RATE %d failed (error = %d)", value, rc); | 249 | dev_err(&port->dev, "Set BAUD RATE %d failed (error = %d)\n", |
250 | value, rc); | ||
250 | else | 251 | else |
251 | tty_encode_baud_rate(tty, speed, speed); | 252 | tty_encode_baud_rate(tty, speed, speed); |
252 | dbg("set_baud_rate: value: 0x%x, divisor: 0x%x", value, divisor); | 253 | dbg("set_baud_rate: value: 0x%x, divisor: 0x%x", value, divisor); |
@@ -274,8 +275,9 @@ static int mct_u232_set_baud_rate(struct tty_struct *tty, | |||
274 | 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN1_SIZE, | 275 | 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN1_SIZE, |
275 | WDR_TIMEOUT); | 276 | WDR_TIMEOUT); |
276 | if (rc < 0) | 277 | if (rc < 0) |
277 | err("Sending USB device request code %d failed (error = %d)", | 278 | dev_err(&port->dev, "Sending USB device request code %d " |
278 | MCT_U232_SET_UNKNOWN1_REQUEST, rc); | 279 | "failed (error = %d)\n", MCT_U232_SET_UNKNOWN1_REQUEST, |
280 | rc); | ||
279 | 281 | ||
280 | if (port && C_CRTSCTS(tty)) | 282 | if (port && C_CRTSCTS(tty)) |
281 | cts_enable_byte = 1; | 283 | cts_enable_byte = 1; |
@@ -288,8 +290,8 @@ static int mct_u232_set_baud_rate(struct tty_struct *tty, | |||
288 | 0, 0, &cts_enable_byte, MCT_U232_SET_CTS_SIZE, | 290 | 0, 0, &cts_enable_byte, MCT_U232_SET_CTS_SIZE, |
289 | WDR_TIMEOUT); | 291 | WDR_TIMEOUT); |
290 | if (rc < 0) | 292 | if (rc < 0) |
291 | err("Sending USB device request code %d failed (error = %d)", | 293 | dev_err(&port->dev, "Sending USB device request code %d " |
292 | MCT_U232_SET_CTS_REQUEST, rc); | 294 | "failed (error = %d)\n", MCT_U232_SET_CTS_REQUEST, rc); |
293 | 295 | ||
294 | return rc; | 296 | return rc; |
295 | } /* mct_u232_set_baud_rate */ | 297 | } /* mct_u232_set_baud_rate */ |
@@ -303,7 +305,8 @@ static int mct_u232_set_line_ctrl(struct usb_serial *serial, unsigned char lcr) | |||
303 | 0, 0, &lcr, MCT_U232_SET_LINE_CTRL_SIZE, | 305 | 0, 0, &lcr, MCT_U232_SET_LINE_CTRL_SIZE, |
304 | WDR_TIMEOUT); | 306 | WDR_TIMEOUT); |
305 | if (rc < 0) | 307 | if (rc < 0) |
306 | err("Set LINE CTRL 0x%x failed (error = %d)", lcr, rc); | 308 | dev_err(&serial->dev->dev, |
309 | "Set LINE CTRL 0x%x failed (error = %d)\n", lcr, rc); | ||
307 | dbg("set_line_ctrl: 0x%x", lcr); | 310 | dbg("set_line_ctrl: 0x%x", lcr); |
308 | return rc; | 311 | return rc; |
309 | } /* mct_u232_set_line_ctrl */ | 312 | } /* mct_u232_set_line_ctrl */ |
@@ -325,7 +328,8 @@ static int mct_u232_set_modem_ctrl(struct usb_serial *serial, | |||
325 | 0, 0, &mcr, MCT_U232_SET_MODEM_CTRL_SIZE, | 328 | 0, 0, &mcr, MCT_U232_SET_MODEM_CTRL_SIZE, |
326 | WDR_TIMEOUT); | 329 | WDR_TIMEOUT); |
327 | if (rc < 0) | 330 | if (rc < 0) |
328 | err("Set MODEM CTRL 0x%x failed (error = %d)", mcr, rc); | 331 | dev_err(&serial->dev->dev, |
332 | "Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc); | ||
329 | dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr); | 333 | dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr); |
330 | 334 | ||
331 | return rc; | 335 | return rc; |
@@ -341,7 +345,8 @@ static int mct_u232_get_modem_stat(struct usb_serial *serial, | |||
341 | 0, 0, msr, MCT_U232_GET_MODEM_STAT_SIZE, | 345 | 0, 0, msr, MCT_U232_GET_MODEM_STAT_SIZE, |
342 | WDR_TIMEOUT); | 346 | WDR_TIMEOUT); |
343 | if (rc < 0) { | 347 | if (rc < 0) { |
344 | err("Get MODEM STATus failed (error = %d)", rc); | 348 | dev_err(&serial->dev->dev, |
349 | "Get MODEM STATus failed (error = %d)\n", rc); | ||
345 | *msr = 0; | 350 | *msr = 0; |
346 | } | 351 | } |
347 | dbg("get_modem_stat: 0x%x", *msr); | 352 | dbg("get_modem_stat: 0x%x", *msr); |
@@ -470,8 +475,9 @@ static int mct_u232_open(struct tty_struct *tty, | |||
470 | port->read_urb->dev = port->serial->dev; | 475 | port->read_urb->dev = port->serial->dev; |
471 | retval = usb_submit_urb(port->read_urb, GFP_KERNEL); | 476 | retval = usb_submit_urb(port->read_urb, GFP_KERNEL); |
472 | if (retval) { | 477 | if (retval) { |
473 | err("usb_submit_urb(read bulk) failed pipe 0x%x err %d", | 478 | dev_err(&port->dev, |
474 | port->read_urb->pipe, retval); | 479 | "usb_submit_urb(read bulk) failed pipe 0x%x err %d\n", |
480 | port->read_urb->pipe, retval); | ||
475 | goto error; | 481 | goto error; |
476 | } | 482 | } |
477 | 483 | ||
@@ -479,8 +485,9 @@ static int mct_u232_open(struct tty_struct *tty, | |||
479 | retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); | 485 | retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); |
480 | if (retval) { | 486 | if (retval) { |
481 | usb_kill_urb(port->read_urb); | 487 | usb_kill_urb(port->read_urb); |
482 | err(" usb_submit_urb(read int) failed pipe 0x%x err %d", | 488 | dev_err(&port->dev, |
483 | port->interrupt_in_urb->pipe, retval); | 489 | "usb_submit_urb(read int) failed pipe 0x%x err %d", |
490 | port->interrupt_in_urb->pipe, retval); | ||
484 | goto error; | 491 | goto error; |
485 | } | 492 | } |
486 | return 0; | 493 | return 0; |
@@ -612,8 +619,9 @@ static void mct_u232_read_int_callback(struct urb *urb) | |||
612 | exit: | 619 | exit: |
613 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 620 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
614 | if (retval) | 621 | if (retval) |
615 | err("%s - usb_submit_urb failed with result %d", | 622 | dev_err(&port->dev, |
616 | __func__, retval); | 623 | "%s - usb_submit_urb failed with result %d\n", |
624 | __func__, retval); | ||
617 | } /* mct_u232_read_int_callback */ | 625 | } /* mct_u232_read_int_callback */ |
618 | 626 | ||
619 | static void mct_u232_set_termios(struct tty_struct *tty, | 627 | static void mct_u232_set_termios(struct tty_struct *tty, |
@@ -680,7 +688,8 @@ static void mct_u232_set_termios(struct tty_struct *tty, | |||
680 | case CS8: | 688 | case CS8: |
681 | last_lcr |= MCT_U232_DATA_BITS_8; break; | 689 | last_lcr |= MCT_U232_DATA_BITS_8; break; |
682 | default: | 690 | default: |
683 | err("CSIZE was not CS5-CS8, using default of 8"); | 691 | dev_err(&port->dev, |
692 | "CSIZE was not CS5-CS8, using default of 8\n"); | ||
684 | last_lcr |= MCT_U232_DATA_BITS_8; | 693 | last_lcr |= MCT_U232_DATA_BITS_8; |
685 | break; | 694 | break; |
686 | } | 695 | } |
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 5711aa55d24b..e772cc0a97fd 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; |
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; |
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index 9890f26cd91d..df6539712726 100644 --- a/drivers/usb/serial/omninet.c +++ b/drivers/usb/serial/omninet.c | |||
@@ -154,8 +154,8 @@ static int omninet_attach(struct usb_serial *serial) | |||
154 | 154 | ||
155 | od = kmalloc(sizeof(struct omninet_data), GFP_KERNEL); | 155 | od = kmalloc(sizeof(struct omninet_data), GFP_KERNEL); |
156 | if (!od) { | 156 | if (!od) { |
157 | err("%s- kmalloc(%Zd) failed.", | 157 | dev_err(&port->dev, "%s- kmalloc(%Zd) failed.\n", |
158 | __func__, sizeof(struct omninet_data)); | 158 | __func__, sizeof(struct omninet_data)); |
159 | return -ENOMEM; | 159 | return -ENOMEM; |
160 | } | 160 | } |
161 | usb_set_serial_port_data(port, od); | 161 | usb_set_serial_port_data(port, od); |
@@ -183,8 +183,9 @@ static int omninet_open(struct tty_struct *tty, | |||
183 | omninet_read_bulk_callback, port); | 183 | omninet_read_bulk_callback, port); |
184 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); | 184 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); |
185 | if (result) | 185 | if (result) |
186 | err("%s - failed submitting read urb, error %d", | 186 | dev_err(&port->dev, |
187 | __func__, result); | 187 | "%s - failed submitting read urb, error %d\n", |
188 | __func__, result); | ||
188 | return result; | 189 | return result; |
189 | } | 190 | } |
190 | 191 | ||
@@ -244,8 +245,9 @@ static void omninet_read_bulk_callback(struct urb *urb) | |||
244 | omninet_read_bulk_callback, port); | 245 | omninet_read_bulk_callback, port); |
245 | result = usb_submit_urb(urb, GFP_ATOMIC); | 246 | result = usb_submit_urb(urb, GFP_ATOMIC); |
246 | if (result) | 247 | if (result) |
247 | err("%s - failed resubmitting read urb, error %d", | 248 | dev_err(&port->dev, |
248 | __func__, result); | 249 | "%s - failed resubmitting read urb, error %d\n", |
250 | __func__, result); | ||
249 | 251 | ||
250 | return; | 252 | return; |
251 | } | 253 | } |
@@ -298,8 +300,9 @@ static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
298 | result = usb_submit_urb(wport->write_urb, GFP_ATOMIC); | 300 | result = usb_submit_urb(wport->write_urb, GFP_ATOMIC); |
299 | if (result) { | 301 | if (result) { |
300 | wport->write_urb_busy = 0; | 302 | wport->write_urb_busy = 0; |
301 | err("%s - failed submitting write urb, error %d", | 303 | dev_err(&port->dev, |
302 | __func__, result); | 304 | "%s - failed submitting write urb, error %d\n", |
305 | __func__, result); | ||
303 | } else | 306 | } else |
304 | result = count; | 307 | result = count; |
305 | 308 | ||
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 40cff61cb4a2..4b463cd140ef 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c | |||
@@ -256,11 +256,12 @@ static void safe_read_bulk_callback(struct urb *urb) | |||
256 | data, actual_length); | 256 | data, actual_length); |
257 | tty_flip_buffer_push(tty); | 257 | tty_flip_buffer_push(tty); |
258 | } else { | 258 | } else { |
259 | err("%s - inconsistent lengths %d:%d", | 259 | dev_err(&port->dev, |
260 | "%s - inconsistent lengths %d:%d\n", | ||
260 | __func__, actual_length, length); | 261 | __func__, actual_length, length); |
261 | } | 262 | } |
262 | } else { | 263 | } else { |
263 | err("%s - bad CRC %x", __func__, fcs); | 264 | dev_err(&port->dev, "%s - bad CRC %x\n", __func__, fcs); |
264 | } | 265 | } |
265 | } else { | 266 | } else { |
266 | tty_insert_flip_string(tty, data, length); | 267 | tty_insert_flip_string(tty, data, length); |
@@ -277,8 +278,9 @@ static void safe_read_bulk_callback(struct urb *urb) | |||
277 | 278 | ||
278 | result = usb_submit_urb(urb, GFP_ATOMIC); | 279 | result = usb_submit_urb(urb, GFP_ATOMIC); |
279 | if (result) | 280 | if (result) |
280 | err("%s - failed resubmitting read urb, error %d", | 281 | dev_err(&port->dev, |
281 | __func__, result); | 282 | "%s - failed resubmitting read urb, error %d\n", |
283 | __func__, result); | ||
282 | /* FIXME: Need a mechanism to retry later if this happens */ | 284 | /* FIXME: Need a mechanism to retry later if this happens */ |
283 | } | 285 | } |
284 | 286 | ||
@@ -369,8 +371,9 @@ static int safe_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
369 | result = usb_submit_urb(port->write_urb, GFP_KERNEL); | 371 | result = usb_submit_urb(port->write_urb, GFP_KERNEL); |
370 | if (result) { | 372 | if (result) { |
371 | port->write_urb_busy = 0; | 373 | port->write_urb_busy = 0; |
372 | err("%s - failed submitting write urb, error %d", | 374 | dev_err(&port->dev, |
373 | __func__, result); | 375 | "%s - failed submitting write urb, error %d\n", |
376 | __func__, result); | ||
374 | return 0; | 377 | return 0; |
375 | } | 378 | } |
376 | dbg("%s urb: %p submitted", __func__, port->write_urb); | 379 | dbg("%s urb: %p submitted", __func__, port->write_urb); |
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index 96aeec746191..a65bc2bd8e71 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c | |||
@@ -589,8 +589,8 @@ static void spcp8x5_set_termios(struct tty_struct *tty, | |||
589 | case 1000000: | 589 | case 1000000: |
590 | buf[0] = 0x0b; break; | 590 | buf[0] = 0x0b; break; |
591 | default: | 591 | default: |
592 | err("spcp825 driver does not support the baudrate " | 592 | dev_err(&port->dev, "spcp825 driver does not support the " |
593 | "requested, using default of 9600."); | 593 | "baudrate requested, using default of 9600.\n"); |
594 | } | 594 | } |
595 | 595 | ||
596 | /* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */ | 596 | /* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */ |
@@ -629,7 +629,8 @@ static void spcp8x5_set_termios(struct tty_struct *tty, | |||
629 | SET_UART_FORMAT_TYPE, SET_UART_FORMAT, | 629 | SET_UART_FORMAT_TYPE, SET_UART_FORMAT, |
630 | uartdata, 0, NULL, 0, 100); | 630 | uartdata, 0, NULL, 0, 100); |
631 | if (i < 0) | 631 | if (i < 0) |
632 | err("Set UART format %#x failed (error = %d)", uartdata, i); | 632 | dev_err(&port->dev, "Set UART format %#x failed (error = %d)\n", |
633 | uartdata, i); | ||
633 | dbg("0x21:0x40:0:0 %d\n", i); | 634 | dbg("0x21:0x40:0:0 %d\n", i); |
634 | 635 | ||
635 | if (cflag & CRTSCTS) { | 636 | if (cflag & CRTSCTS) { |
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 92ba4f7361e4..8be3f39891c7 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -1121,7 +1121,8 @@ static int __init usb_serial_init(void) | |||
1121 | 1121 | ||
1122 | result = bus_register(&usb_serial_bus_type); | 1122 | result = bus_register(&usb_serial_bus_type); |
1123 | if (result) { | 1123 | if (result) { |
1124 | err("%s - registering bus driver failed", __func__); | 1124 | printk(KERN_ERR "usb-serial: %s - registering bus driver " |
1125 | "failed\n", __func__); | ||
1125 | goto exit_bus; | 1126 | goto exit_bus; |
1126 | } | 1127 | } |
1127 | 1128 | ||
@@ -1142,21 +1143,24 @@ static int __init usb_serial_init(void) | |||
1142 | tty_set_operations(usb_serial_tty_driver, &serial_ops); | 1143 | tty_set_operations(usb_serial_tty_driver, &serial_ops); |
1143 | result = tty_register_driver(usb_serial_tty_driver); | 1144 | result = tty_register_driver(usb_serial_tty_driver); |
1144 | if (result) { | 1145 | if (result) { |
1145 | err("%s - tty_register_driver failed", __func__); | 1146 | printk(KERN_ERR "usb-serial: %s - tty_register_driver failed\n", |
1147 | __func__); | ||
1146 | goto exit_reg_driver; | 1148 | goto exit_reg_driver; |
1147 | } | 1149 | } |
1148 | 1150 | ||
1149 | /* register the USB driver */ | 1151 | /* register the USB driver */ |
1150 | result = usb_register(&usb_serial_driver); | 1152 | result = usb_register(&usb_serial_driver); |
1151 | if (result < 0) { | 1153 | if (result < 0) { |
1152 | err("%s - usb_register failed", __func__); | 1154 | printk(KERN_ERR "usb-serial: %s - usb_register failed\n", |
1155 | __func__); | ||
1153 | goto exit_tty; | 1156 | goto exit_tty; |
1154 | } | 1157 | } |
1155 | 1158 | ||
1156 | /* register the generic driver, if we should */ | 1159 | /* register the generic driver, if we should */ |
1157 | result = usb_serial_generic_register(debug); | 1160 | result = usb_serial_generic_register(debug); |
1158 | if (result < 0) { | 1161 | if (result < 0) { |
1159 | err("%s - registering generic driver failed", __func__); | 1162 | printk(KERN_ERR "usb-serial: %s - registering generic " |
1163 | "driver failed\n", __func__); | ||
1160 | goto exit_generic; | 1164 | goto exit_generic; |
1161 | } | 1165 | } |
1162 | 1166 | ||
@@ -1174,7 +1178,8 @@ exit_reg_driver: | |||
1174 | bus_unregister(&usb_serial_bus_type); | 1178 | bus_unregister(&usb_serial_bus_type); |
1175 | 1179 | ||
1176 | exit_bus: | 1180 | exit_bus: |
1177 | err("%s - returning with error %d", __func__, result); | 1181 | printk(KERN_ERR "usb-serial: %s - returning with error %d\n", |
1182 | __func__, result); | ||
1178 | put_tty_driver(usb_serial_tty_driver); | 1183 | put_tty_driver(usb_serial_tty_driver); |
1179 | return result; | 1184 | return result; |
1180 | } | 1185 | } |
@@ -1233,8 +1238,8 @@ int usb_serial_register(struct usb_serial_driver *driver) | |||
1233 | 1238 | ||
1234 | retval = usb_serial_bus_register(driver); | 1239 | retval = usb_serial_bus_register(driver); |
1235 | if (retval) { | 1240 | if (retval) { |
1236 | err("problem %d when registering driver %s", | 1241 | printk(KERN_ERR "usb-serial: problem %d when registering " |
1237 | retval, driver->description); | 1242 | "driver %s\n", retval, driver->description); |
1238 | list_del(&driver->driver_list); | 1243 | list_del(&driver->driver_list); |
1239 | } else | 1244 | } else |
1240 | printk(KERN_INFO "USB Serial support registered for %s\n", | 1245 | printk(KERN_INFO "USB Serial support registered for %s\n", |
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index de4b5f0e7f3d..4facce3d9364 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c | |||
@@ -768,7 +768,7 @@ static int visor_probe(struct usb_serial *serial, | |||
768 | dbg("%s", __func__); | 768 | dbg("%s", __func__); |
769 | 769 | ||
770 | if (serial->dev->actconfig->desc.bConfigurationValue != 1) { | 770 | if (serial->dev->actconfig->desc.bConfigurationValue != 1) { |
771 | err("active config #%d != 1 ??", | 771 | dev_err(&serial->dev->dev, "active config #%d != 1 ??\n", |
772 | serial->dev->actconfig->desc.bConfigurationValue); | 772 | serial->dev->actconfig->desc.bConfigurationValue); |
773 | return -ENODEV; | 773 | return -ENODEV; |
774 | } | 774 | } |
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 39f7f8d291d6..5335d3211c07 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -303,12 +303,15 @@ static int whiteheat_firmware_download(struct usb_serial *serial, | |||
303 | 303 | ||
304 | if (request_ihex_firmware(&firmware_fw, "whiteheat.fw", | 304 | if (request_ihex_firmware(&firmware_fw, "whiteheat.fw", |
305 | &serial->dev->dev)) { | 305 | &serial->dev->dev)) { |
306 | err("%s - request \"whiteheat.fw\" failed", __func__); | 306 | dev_err(&serial->dev->dev, |
307 | "%s - request \"whiteheat.fw\" failed\n", __func__); | ||
307 | goto out; | 308 | goto out; |
308 | } | 309 | } |
309 | if (request_ihex_firmware(&loader_fw, "whiteheat_loader.fw", | 310 | if (request_ihex_firmware(&loader_fw, "whiteheat_loader.fw", |
310 | &serial->dev->dev)) { | 311 | &serial->dev->dev)) { |
311 | err("%s - request \"whiteheat_loader.fw\" failed", __func__); | 312 | dev_err(&serial->dev->dev, |
313 | "%s - request \"whiteheat_loader.fw\" failed\n", | ||
314 | __func__); | ||
312 | goto out; | 315 | goto out; |
313 | } | 316 | } |
314 | ret = 0; | 317 | ret = 0; |
@@ -320,9 +323,10 @@ static int whiteheat_firmware_download(struct usb_serial *serial, | |||
320 | (unsigned char *)record->data, | 323 | (unsigned char *)record->data, |
321 | be16_to_cpu(record->len), 0xa0); | 324 | be16_to_cpu(record->len), 0xa0); |
322 | if (response < 0) { | 325 | if (response < 0) { |
323 | err("%s - ezusb_writememory failed for loader (%d %04X %p %d)", | 326 | dev_err(&serial->dev->dev, "%s - ezusb_writememory " |
324 | __func__, response, be32_to_cpu(record->addr), | 327 | "failed for loader (%d %04X %p %d)\n", |
325 | record->data, be16_to_cpu(record->len)); | 328 | __func__, response, be32_to_cpu(record->addr), |
329 | record->data, be16_to_cpu(record->len)); | ||
326 | break; | 330 | break; |
327 | } | 331 | } |
328 | record = ihex_next_binrec(record); | 332 | record = ihex_next_binrec(record); |
@@ -338,9 +342,11 @@ static int whiteheat_firmware_download(struct usb_serial *serial, | |||
338 | (unsigned char *)record->data, | 342 | (unsigned char *)record->data, |
339 | be16_to_cpu(record->len), 0xa3); | 343 | be16_to_cpu(record->len), 0xa3); |
340 | if (response < 0) { | 344 | if (response < 0) { |
341 | err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", | 345 | dev_err(&serial->dev->dev, "%s - ezusb_writememory " |
342 | __func__, response, be32_to_cpu(record->addr), | 346 | "failed for first firmware step " |
343 | record->data, be16_to_cpu(record->len)); | 347 | "(%d %04X %p %d)\n", __func__, response, |
348 | be32_to_cpu(record->addr), record->data, | ||
349 | be16_to_cpu(record->len)); | ||
344 | break; | 350 | break; |
345 | } | 351 | } |
346 | ++record; | 352 | ++record; |
@@ -354,9 +360,11 @@ static int whiteheat_firmware_download(struct usb_serial *serial, | |||
354 | (unsigned char *)record->data, | 360 | (unsigned char *)record->data, |
355 | be16_to_cpu(record->len), 0xa0); | 361 | be16_to_cpu(record->len), 0xa0); |
356 | if (response < 0) { | 362 | if (response < 0) { |
357 | err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", | 363 | dev_err(&serial->dev->dev, "%s - ezusb_writememory " |
358 | __func__, response, be32_to_cpu(record->addr), | 364 | "failed for second firmware step " |
359 | record->data, be16_to_cpu(record->len)); | 365 | "(%d %04X %p %d)\n", __func__, response, |
366 | be32_to_cpu(record->addr), record->data, | ||
367 | be16_to_cpu(record->len)); | ||
360 | break; | 368 | break; |
361 | } | 369 | } |
362 | ++record; | 370 | ++record; |
@@ -421,12 +429,12 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
421 | ret = usb_bulk_msg(serial->dev, pipe, command, 2, | 429 | ret = usb_bulk_msg(serial->dev, pipe, command, 2, |
422 | &alen, COMMAND_TIMEOUT_MS); | 430 | &alen, COMMAND_TIMEOUT_MS); |
423 | if (ret) { | 431 | if (ret) { |
424 | err("%s: Couldn't send command [%d]", | 432 | dev_err(&serial->dev->dev, "%s: Couldn't send command [%d]\n", |
425 | serial->type->description, ret); | 433 | serial->type->description, ret); |
426 | goto no_firmware; | 434 | goto no_firmware; |
427 | } else if (alen != 2) { | 435 | } else if (alen != 2) { |
428 | err("%s: Send command incomplete [%d]", | 436 | dev_err(&serial->dev->dev, "%s: Send command incomplete [%d]\n", |
429 | serial->type->description, alen); | 437 | serial->type->description, alen); |
430 | goto no_firmware; | 438 | goto no_firmware; |
431 | } | 439 | } |
432 | 440 | ||
@@ -437,16 +445,16 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
437 | ret = usb_bulk_msg(serial->dev, pipe, result, | 445 | ret = usb_bulk_msg(serial->dev, pipe, result, |
438 | sizeof(*hw_info) + 1, &alen, COMMAND_TIMEOUT_MS); | 446 | sizeof(*hw_info) + 1, &alen, COMMAND_TIMEOUT_MS); |
439 | if (ret) { | 447 | if (ret) { |
440 | err("%s: Couldn't get results [%d]", | 448 | dev_err(&serial->dev->dev, "%s: Couldn't get results [%d]\n", |
441 | serial->type->description, ret); | 449 | serial->type->description, ret); |
442 | goto no_firmware; | 450 | goto no_firmware; |
443 | } else if (alen != sizeof(*hw_info) + 1) { | 451 | } else if (alen != sizeof(*hw_info) + 1) { |
444 | err("%s: Get results incomplete [%d]", | 452 | dev_err(&serial->dev->dev, "%s: Get results incomplete [%d]\n", |
445 | serial->type->description, alen); | 453 | serial->type->description, alen); |
446 | goto no_firmware; | 454 | goto no_firmware; |
447 | } else if (result[0] != command[0]) { | 455 | } else if (result[0] != command[0]) { |
448 | err("%s: Command failed [%d]", | 456 | dev_err(&serial->dev->dev, "%s: Command failed [%d]\n", |
449 | serial->type->description, result[0]); | 457 | serial->type->description, result[0]); |
450 | goto no_firmware; | 458 | goto no_firmware; |
451 | } | 459 | } |
452 | 460 | ||
@@ -461,8 +469,9 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
461 | 469 | ||
462 | info = kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL); | 470 | info = kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL); |
463 | if (info == NULL) { | 471 | if (info == NULL) { |
464 | err("%s: Out of memory for port structures\n", | 472 | dev_err(&port->dev, |
465 | serial->type->description); | 473 | "%s: Out of memory for port structures\n", |
474 | serial->type->description); | ||
466 | goto no_private; | 475 | goto no_private; |
467 | } | 476 | } |
468 | 477 | ||
@@ -482,18 +491,20 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
482 | for (j = 0; j < urb_pool_size; j++) { | 491 | for (j = 0; j < urb_pool_size; j++) { |
483 | urb = usb_alloc_urb(0, GFP_KERNEL); | 492 | urb = usb_alloc_urb(0, GFP_KERNEL); |
484 | if (!urb) { | 493 | if (!urb) { |
485 | err("No free urbs available"); | 494 | dev_err(&port->dev, "No free urbs available\n"); |
486 | goto no_rx_urb; | 495 | goto no_rx_urb; |
487 | } | 496 | } |
488 | buf_size = port->read_urb->transfer_buffer_length; | 497 | buf_size = port->read_urb->transfer_buffer_length; |
489 | urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL); | 498 | urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL); |
490 | if (!urb->transfer_buffer) { | 499 | if (!urb->transfer_buffer) { |
491 | err("Couldn't allocate urb buffer"); | 500 | dev_err(&port->dev, |
501 | "Couldn't allocate urb buffer\n"); | ||
492 | goto no_rx_buf; | 502 | goto no_rx_buf; |
493 | } | 503 | } |
494 | wrap = kmalloc(sizeof(*wrap), GFP_KERNEL); | 504 | wrap = kmalloc(sizeof(*wrap), GFP_KERNEL); |
495 | if (!wrap) { | 505 | if (!wrap) { |
496 | err("Couldn't allocate urb wrapper"); | 506 | dev_err(&port->dev, |
507 | "Couldn't allocate urb wrapper\n"); | ||
497 | goto no_rx_wrap; | 508 | goto no_rx_wrap; |
498 | } | 509 | } |
499 | usb_fill_bulk_urb(urb, serial->dev, | 510 | usb_fill_bulk_urb(urb, serial->dev, |
@@ -506,18 +517,20 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
506 | 517 | ||
507 | urb = usb_alloc_urb(0, GFP_KERNEL); | 518 | urb = usb_alloc_urb(0, GFP_KERNEL); |
508 | if (!urb) { | 519 | if (!urb) { |
509 | err("No free urbs available"); | 520 | dev_err(&port->dev, "No free urbs available\n"); |
510 | goto no_tx_urb; | 521 | goto no_tx_urb; |
511 | } | 522 | } |
512 | buf_size = port->write_urb->transfer_buffer_length; | 523 | buf_size = port->write_urb->transfer_buffer_length; |
513 | urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL); | 524 | urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL); |
514 | if (!urb->transfer_buffer) { | 525 | if (!urb->transfer_buffer) { |
515 | err("Couldn't allocate urb buffer"); | 526 | dev_err(&port->dev, |
527 | "Couldn't allocate urb buffer\n"); | ||
516 | goto no_tx_buf; | 528 | goto no_tx_buf; |
517 | } | 529 | } |
518 | wrap = kmalloc(sizeof(*wrap), GFP_KERNEL); | 530 | wrap = kmalloc(sizeof(*wrap), GFP_KERNEL); |
519 | if (!wrap) { | 531 | if (!wrap) { |
520 | err("Couldn't allocate urb wrapper"); | 532 | dev_err(&port->dev, |
533 | "Couldn't allocate urb wrapper\n"); | ||
521 | goto no_tx_wrap; | 534 | goto no_tx_wrap; |
522 | } | 535 | } |
523 | usb_fill_bulk_urb(urb, serial->dev, | 536 | usb_fill_bulk_urb(urb, serial->dev, |
@@ -535,8 +548,9 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
535 | command_info = kmalloc(sizeof(struct whiteheat_command_private), | 548 | command_info = kmalloc(sizeof(struct whiteheat_command_private), |
536 | GFP_KERNEL); | 549 | GFP_KERNEL); |
537 | if (command_info == NULL) { | 550 | if (command_info == NULL) { |
538 | err("%s: Out of memory for port structures\n", | 551 | dev_err(&serial->dev->dev, |
539 | serial->type->description); | 552 | "%s: Out of memory for port structures\n", |
553 | serial->type->description); | ||
540 | goto no_command_private; | 554 | goto no_command_private; |
541 | } | 555 | } |
542 | 556 | ||
@@ -553,12 +567,15 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
553 | 567 | ||
554 | no_firmware: | 568 | no_firmware: |
555 | /* Firmware likely not running */ | 569 | /* Firmware likely not running */ |
556 | err("%s: Unable to retrieve firmware version, try replugging\n", | 570 | dev_err(&serial->dev->dev, |
557 | serial->type->description); | 571 | "%s: Unable to retrieve firmware version, try replugging\n", |
558 | err("%s: If the firmware is not running (status led not blinking)\n", | 572 | serial->type->description); |
559 | serial->type->description); | 573 | dev_err(&serial->dev->dev, |
560 | err("%s: please contact support@connecttech.com\n", | 574 | "%s: If the firmware is not running (status led not blinking)\n", |
561 | serial->type->description); | 575 | serial->type->description); |
576 | dev_err(&serial->dev->dev, | ||
577 | "%s: please contact support@connecttech.com\n", | ||
578 | serial->type->description); | ||
562 | kfree(result); | 579 | kfree(result); |
563 | return -ENODEV; | 580 | return -ENODEV; |
564 | 581 | ||
@@ -681,8 +698,9 @@ static int whiteheat_open(struct tty_struct *tty, | |||
681 | /* Start reading from the device */ | 698 | /* Start reading from the device */ |
682 | retval = start_port_read(port); | 699 | retval = start_port_read(port); |
683 | if (retval) { | 700 | if (retval) { |
684 | err("%s - failed submitting read urb, error %d", | 701 | dev_err(&port->dev, |
685 | __func__, retval); | 702 | "%s - failed submitting read urb, error %d\n", |
703 | __func__, retval); | ||
686 | firm_close(port); | 704 | firm_close(port); |
687 | stop_command_port(port->serial); | 705 | stop_command_port(port->serial); |
688 | goto exit; | 706 | goto exit; |
@@ -807,8 +825,9 @@ static int whiteheat_write(struct tty_struct *tty, | |||
807 | urb->transfer_buffer_length = bytes; | 825 | urb->transfer_buffer_length = bytes; |
808 | result = usb_submit_urb(urb, GFP_ATOMIC); | 826 | result = usb_submit_urb(urb, GFP_ATOMIC); |
809 | if (result) { | 827 | if (result) { |
810 | err("%s - failed submitting write urb, error %d", | 828 | dev_err(&port->dev, |
811 | __func__, result); | 829 | "%s - failed submitting write urb, error %d\n", |
830 | __func__, result); | ||
812 | sent = result; | 831 | sent = result; |
813 | spin_lock_irqsave(&info->lock, flags); | 832 | spin_lock_irqsave(&info->lock, flags); |
814 | list_add(tmp, &info->tx_urbs_free); | 833 | list_add(tmp, &info->tx_urbs_free); |
@@ -1076,7 +1095,7 @@ static void whiteheat_read_callback(struct urb *urb) | |||
1076 | wrap = urb_to_wrap(urb, &info->rx_urbs_submitted); | 1095 | wrap = urb_to_wrap(urb, &info->rx_urbs_submitted); |
1077 | if (!wrap) { | 1096 | if (!wrap) { |
1078 | spin_unlock(&info->lock); | 1097 | spin_unlock(&info->lock); |
1079 | err("%s - Not my urb!", __func__); | 1098 | dev_err(&port->dev, "%s - Not my urb!\n", __func__); |
1080 | return; | 1099 | return; |
1081 | } | 1100 | } |
1082 | list_del(&wrap->list); | 1101 | list_del(&wrap->list); |
@@ -1120,7 +1139,7 @@ static void whiteheat_write_callback(struct urb *urb) | |||
1120 | wrap = urb_to_wrap(urb, &info->tx_urbs_submitted); | 1139 | wrap = urb_to_wrap(urb, &info->tx_urbs_submitted); |
1121 | if (!wrap) { | 1140 | if (!wrap) { |
1122 | spin_unlock(&info->lock); | 1141 | spin_unlock(&info->lock); |
1123 | err("%s - Not my urb!", __func__); | 1142 | dev_err(&port->dev, "%s - Not my urb!\n", __func__); |
1124 | return; | 1143 | return; |
1125 | } | 1144 | } |
1126 | list_move(&wrap->list, &info->tx_urbs_free); | 1145 | list_move(&wrap->list, &info->tx_urbs_free); |
@@ -1384,8 +1403,9 @@ static int start_command_port(struct usb_serial *serial) | |||
1384 | command_port->read_urb->dev = serial->dev; | 1403 | command_port->read_urb->dev = serial->dev; |
1385 | retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL); | 1404 | retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL); |
1386 | if (retval) { | 1405 | if (retval) { |
1387 | err("%s - failed submitting read urb, error %d", | 1406 | dev_err(&serial->dev->dev, |
1388 | __func__, retval); | 1407 | "%s - failed submitting read urb, error %d\n", |
1408 | __func__, retval); | ||
1389 | goto exit; | 1409 | goto exit; |
1390 | } | 1410 | } |
1391 | } | 1411 | } |
@@ -1523,7 +1543,8 @@ static void rx_data_softint(struct work_struct *work) | |||
1523 | urb->dev = port->serial->dev; | 1543 | urb->dev = port->serial->dev; |
1524 | result = usb_submit_urb(urb, GFP_ATOMIC); | 1544 | result = usb_submit_urb(urb, GFP_ATOMIC); |
1525 | if (result) { | 1545 | if (result) { |
1526 | err("%s - failed resubmitting read urb, error %d", | 1546 | dev_err(&port->dev, |
1547 | "%s - failed resubmitting read urb, error %d\n", | ||
1527 | __func__, result); | 1548 | __func__, result); |
1528 | spin_lock_irqsave(&info->lock, flags); | 1549 | spin_lock_irqsave(&info->lock, flags); |
1529 | list_add(tmp, &info->rx_urbs_free); | 1550 | list_add(tmp, &info->rx_urbs_free); |