diff options
Diffstat (limited to 'drivers/usb/serial')
35 files changed, 503 insertions, 362 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 1913bc7c5f0b..b7eacad4d48c 100644 --- a/drivers/usb/serial/belkin_sa.c +++ b/drivers/usb/serial/belkin_sa.c | |||
@@ -187,7 +187,7 @@ static int belkin_sa_startup(struct usb_serial *serial) | |||
187 | /* see comments at top of file */ | 187 | /* see comments at top of file */ |
188 | priv->bad_flow_control = | 188 | priv->bad_flow_control = |
189 | (le16_to_cpu(dev->descriptor.bcdDevice) <= 0x0206) ? 1 : 0; | 189 | (le16_to_cpu(dev->descriptor.bcdDevice) <= 0x0206) ? 1 : 0; |
190 | info("bcdDevice: %04x, bfc: %d", | 190 | dev_info(&dev->dev, "bcdDevice: %04x, bfc: %d\n", |
191 | le16_to_cpu(dev->descriptor.bcdDevice), | 191 | le16_to_cpu(dev->descriptor.bcdDevice), |
192 | priv->bad_flow_control); | 192 | priv->bad_flow_control); |
193 | 193 | ||
@@ -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: |
@@ -577,7 +577,8 @@ static int __init belkin_sa_init(void) | |||
577 | retval = usb_register(&belkin_driver); | 577 | retval = usb_register(&belkin_driver); |
578 | if (retval) | 578 | if (retval) |
579 | goto failed_usb_register; | 579 | goto failed_usb_register; |
580 | info(DRIVER_DESC " " DRIVER_VERSION); | 580 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
581 | DRIVER_DESC "\n"); | ||
581 | return 0; | 582 | return 0; |
582 | failed_usb_register: | 583 | failed_usb_register: |
583 | usb_serial_deregister(&belkin_device); | 584 | usb_serial_deregister(&belkin_device); |
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c index 1279553381e3..8008d0bc80ad 100644 --- a/drivers/usb/serial/cp2101.c +++ b/drivers/usb/serial/cp2101.c | |||
@@ -753,7 +753,8 @@ static int __init cp2101_init(void) | |||
753 | } | 753 | } |
754 | 754 | ||
755 | /* Success */ | 755 | /* Success */ |
756 | info(DRIVER_DESC " " DRIVER_VERSION); | 756 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
757 | DRIVER_DESC "\n"); | ||
757 | return 0; | 758 | return 0; |
758 | } | 759 | } |
759 | 760 | ||
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 94ef36c4764b..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; |
@@ -499,8 +504,9 @@ static int __init cyberjack_init(void) | |||
499 | if (retval) | 504 | if (retval) |
500 | goto failed_usb_register; | 505 | goto failed_usb_register; |
501 | 506 | ||
502 | info(DRIVER_VERSION " " DRIVER_AUTHOR); | 507 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION " " |
503 | info(DRIVER_DESC); | 508 | DRIVER_AUTHOR "\n"); |
509 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); | ||
504 | 510 | ||
505 | return 0; | 511 | return 0; |
506 | failed_usb_register: | 512 | failed_usb_register: |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index f3514a91f915..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); |
@@ -1658,7 +1660,8 @@ static int __init cypress_init(void) | |||
1658 | if (retval) | 1660 | if (retval) |
1659 | goto failed_usb_register; | 1661 | goto failed_usb_register; |
1660 | 1662 | ||
1661 | info(DRIVER_DESC " " DRIVER_VERSION); | 1663 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
1664 | DRIVER_DESC "\n"); | ||
1662 | return 0; | 1665 | return 0; |
1663 | 1666 | ||
1664 | failed_usb_register: | 1667 | failed_usb_register: |
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 5756ac6d6c92..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 | ||
@@ -1854,7 +1869,8 @@ static int __init digi_init(void) | |||
1854 | retval = usb_register(&digi_driver); | 1869 | retval = usb_register(&digi_driver); |
1855 | if (retval) | 1870 | if (retval) |
1856 | goto failed_usb_register; | 1871 | goto failed_usb_register; |
1857 | info(DRIVER_VERSION ":" DRIVER_DESC); | 1872 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
1873 | DRIVER_DESC "\n"); | ||
1858 | return 0; | 1874 | return 0; |
1859 | failed_usb_register: | 1875 | failed_usb_register: |
1860 | usb_serial_deregister(&digi_acceleport_4_device); | 1876 | usb_serial_deregister(&digi_acceleport_4_device); |
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index 1072e847280f..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 | } |
@@ -519,7 +519,8 @@ static int __init empeg_init(void) | |||
519 | if (retval) | 519 | if (retval) |
520 | goto failed_usb_register; | 520 | goto failed_usb_register; |
521 | 521 | ||
522 | info(DRIVER_VERSION ":" DRIVER_DESC); | 522 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
523 | DRIVER_DESC "\n"); | ||
523 | 524 | ||
524 | return 0; | 525 | return 0; |
525 | failed_usb_register: | 526 | failed_usb_register: |
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 c2ac129557aa..51d7bdea2869 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -578,6 +578,7 @@ static struct usb_device_id id_table_combined [] = { | |||
578 | { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) }, | 578 | { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) }, |
579 | { USB_DEVICE(FALCOM_VID, FALCOM_SAMBA_PID) }, | 579 | { USB_DEVICE(FALCOM_VID, FALCOM_SAMBA_PID) }, |
580 | { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) }, | 580 | { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) }, |
581 | { USB_DEVICE(FTDI_VID, FTDI_OCEANIC_PID) }, | ||
581 | { USB_DEVICE(TTI_VID, TTI_QL355P_PID) }, | 582 | { USB_DEVICE(TTI_VID, TTI_QL355P_PID) }, |
582 | { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) }, | 583 | { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) }, |
583 | { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, | 584 | { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, |
@@ -1153,7 +1154,7 @@ static void ftdi_determine_type(struct usb_serial_port *port) | |||
1153 | /* Assume its an FT232R */ | 1154 | /* Assume its an FT232R */ |
1154 | priv->chip_type = FT232RL; | 1155 | priv->chip_type = FT232RL; |
1155 | } | 1156 | } |
1156 | info("Detected %s", ftdi_chip_name[priv->chip_type]); | 1157 | dev_info(&udev->dev, "Detected %s\n", ftdi_chip_name[priv->chip_type]); |
1157 | } | 1158 | } |
1158 | 1159 | ||
1159 | 1160 | ||
@@ -1326,7 +1327,7 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) | |||
1326 | 1327 | ||
1327 | priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL); | 1328 | priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL); |
1328 | if (!priv) { | 1329 | if (!priv) { |
1329 | err("%s- kmalloc(%Zd) failed.", __func__, | 1330 | dev_err(&port->dev, "%s- kmalloc(%Zd) failed.\n", __func__, |
1330 | sizeof(struct ftdi_private)); | 1331 | sizeof(struct ftdi_private)); |
1331 | return -ENOMEM; | 1332 | return -ENOMEM; |
1332 | } | 1333 | } |
@@ -1409,7 +1410,8 @@ static int ftdi_jtag_probe(struct usb_serial *serial) | |||
1409 | dbg("%s", __func__); | 1410 | dbg("%s", __func__); |
1410 | 1411 | ||
1411 | if (interface == udev->actconfig->interface[0]) { | 1412 | if (interface == udev->actconfig->interface[0]) { |
1412 | info("Ignoring serial port reserved for JTAG"); | 1413 | dev_info(&udev->dev, |
1414 | "Ignoring serial port reserved for JTAG\n"); | ||
1413 | return -ENODEV; | 1415 | return -ENODEV; |
1414 | } | 1416 | } |
1415 | 1417 | ||
@@ -1427,7 +1429,8 @@ static int ftdi_mtxorb_hack_setup(struct usb_serial *serial) | |||
1427 | 1429 | ||
1428 | if (ep->enabled && ep_desc->wMaxPacketSize == 0) { | 1430 | if (ep->enabled && ep_desc->wMaxPacketSize == 0) { |
1429 | ep_desc->wMaxPacketSize = cpu_to_le16(0x40); | 1431 | ep_desc->wMaxPacketSize = cpu_to_le16(0x40); |
1430 | info("Fixing invalid wMaxPacketSize on read pipe"); | 1432 | dev_info(&serial->dev->dev, |
1433 | "Fixing invalid wMaxPacketSize on read pipe\n"); | ||
1431 | } | 1434 | } |
1432 | 1435 | ||
1433 | return 0; | 1436 | return 0; |
@@ -1521,8 +1524,9 @@ static int ftdi_open(struct tty_struct *tty, | |||
1521 | ftdi_read_bulk_callback, port); | 1524 | ftdi_read_bulk_callback, port); |
1522 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); | 1525 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); |
1523 | if (result) | 1526 | if (result) |
1524 | err("%s - failed submitting read urb, error %d", | 1527 | dev_err(&port->dev, |
1525 | __func__, result); | 1528 | "%s - failed submitting read urb, error %d\n", |
1529 | __func__, result); | ||
1526 | 1530 | ||
1527 | 1531 | ||
1528 | return result; | 1532 | return result; |
@@ -1556,7 +1560,7 @@ static void ftdi_close(struct tty_struct *tty, | |||
1556 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, | 1560 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, |
1557 | 0, priv->interface, buf, 0, | 1561 | 0, priv->interface, buf, 0, |
1558 | WDR_TIMEOUT) < 0) { | 1562 | WDR_TIMEOUT) < 0) { |
1559 | err("error from flowcontrol urb"); | 1563 | dev_err(&port->dev, "error from flowcontrol urb\n"); |
1560 | } | 1564 | } |
1561 | 1565 | ||
1562 | /* drop RTS and DTR */ | 1566 | /* drop RTS and DTR */ |
@@ -1621,14 +1625,15 @@ static int ftdi_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
1621 | 1625 | ||
1622 | buffer = kmalloc(transfer_size, GFP_ATOMIC); | 1626 | buffer = kmalloc(transfer_size, GFP_ATOMIC); |
1623 | if (!buffer) { | 1627 | if (!buffer) { |
1624 | 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__); | ||
1625 | count = -ENOMEM; | 1630 | count = -ENOMEM; |
1626 | goto error_no_buffer; | 1631 | goto error_no_buffer; |
1627 | } | 1632 | } |
1628 | 1633 | ||
1629 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 1634 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
1630 | if (!urb) { | 1635 | if (!urb) { |
1631 | err("%s - no more free urbs", __func__); | 1636 | dev_err(&port->dev, "%s - no more free urbs\n", __func__); |
1632 | count = -ENOMEM; | 1637 | count = -ENOMEM; |
1633 | goto error_no_urb; | 1638 | goto error_no_urb; |
1634 | } | 1639 | } |
@@ -1672,8 +1677,9 @@ static int ftdi_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
1672 | 1677 | ||
1673 | status = usb_submit_urb(urb, GFP_ATOMIC); | 1678 | status = usb_submit_urb(urb, GFP_ATOMIC); |
1674 | if (status) { | 1679 | if (status) { |
1675 | err("%s - failed submitting write urb, error %d", | 1680 | dev_err(&port->dev, |
1676 | __func__, status); | 1681 | "%s - failed submitting write urb, error %d\n", |
1682 | __func__, status); | ||
1677 | count = status; | 1683 | count = status; |
1678 | goto error; | 1684 | goto error; |
1679 | } else { | 1685 | } else { |
@@ -1780,7 +1786,8 @@ static int ftdi_chars_in_buffer(struct tty_struct *tty) | |||
1780 | buffered = (int)priv->tx_outstanding_bytes; | 1786 | buffered = (int)priv->tx_outstanding_bytes; |
1781 | spin_unlock_irqrestore(&priv->tx_lock, flags); | 1787 | spin_unlock_irqrestore(&priv->tx_lock, flags); |
1782 | if (buffered < 0) { | 1788 | if (buffered < 0) { |
1783 | err("%s outstanding tx bytes is negative!", __func__); | 1789 | dev_err(&port->dev, "%s outstanding tx bytes is negative!\n", |
1790 | __func__); | ||
1784 | buffered = 0; | 1791 | buffered = 0; |
1785 | } | 1792 | } |
1786 | return buffered; | 1793 | return buffered; |
@@ -1796,11 +1803,12 @@ static void ftdi_read_bulk_callback(struct urb *urb) | |||
1796 | int status = urb->status; | 1803 | int status = urb->status; |
1797 | 1804 | ||
1798 | if (urb->number_of_packets > 0) { | 1805 | if (urb->number_of_packets > 0) { |
1799 | err("%s transfer_buffer_length %d actual_length %d number of packets %d", | 1806 | dev_err(&port->dev, "%s transfer_buffer_length %d " |
1800 | __func__, | 1807 | "actual_length %d number of packets %d\n", __func__, |
1801 | urb->transfer_buffer_length, | 1808 | urb->transfer_buffer_length, |
1802 | urb->actual_length, urb->number_of_packets); | 1809 | urb->actual_length, urb->number_of_packets); |
1803 | err("%s transfer_flags %x ", __func__, urb->transfer_flags); | 1810 | dev_err(&port->dev, "%s transfer_flags %x\n", __func__, |
1811 | urb->transfer_flags); | ||
1804 | } | 1812 | } |
1805 | 1813 | ||
1806 | dbg("%s - port %d", __func__, port->number); | 1814 | dbg("%s - port %d", __func__, port->number); |
@@ -1821,7 +1829,7 @@ static void ftdi_read_bulk_callback(struct urb *urb) | |||
1821 | } | 1829 | } |
1822 | 1830 | ||
1823 | if (urb != port->read_urb) | 1831 | if (urb != port->read_urb) |
1824 | err("%s - Not my urb!", __func__); | 1832 | dev_err(&port->dev, "%s - Not my urb!\n", __func__); |
1825 | 1833 | ||
1826 | if (status) { | 1834 | if (status) { |
1827 | /* 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 |
@@ -1924,7 +1932,8 @@ static void ftdi_process_read(struct work_struct *work) | |||
1924 | 1932 | ||
1925 | length = min(PKTSZ, urb->actual_length-packet_offset)-2; | 1933 | length = min(PKTSZ, urb->actual_length-packet_offset)-2; |
1926 | if (length < 0) { | 1934 | if (length < 0) { |
1927 | err("%s - bad packet length: %d", __func__, length+2); | 1935 | dev_err(&port->dev, "%s - bad packet length: %d\n", |
1936 | __func__, length+2); | ||
1928 | length = 0; | 1937 | length = 0; |
1929 | } | 1938 | } |
1930 | 1939 | ||
@@ -2039,8 +2048,9 @@ static void ftdi_process_read(struct work_struct *work) | |||
2039 | 2048 | ||
2040 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 2049 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); |
2041 | if (result) | 2050 | if (result) |
2042 | err("%s - failed resubmitting read urb, error %d", | 2051 | dev_err(&port->dev, |
2043 | __func__, result); | 2052 | "%s - failed resubmitting read urb, error %d\n", |
2053 | __func__, result); | ||
2044 | } | 2054 | } |
2045 | out: | 2055 | out: |
2046 | tty_kref_put(tty); | 2056 | tty_kref_put(tty); |
@@ -2069,8 +2079,8 @@ static void ftdi_break_ctl(struct tty_struct *tty, int break_state) | |||
2069 | FTDI_SIO_SET_DATA_REQUEST_TYPE, | 2079 | FTDI_SIO_SET_DATA_REQUEST_TYPE, |
2070 | urb_value , priv->interface, | 2080 | urb_value , priv->interface, |
2071 | buf, 0, WDR_TIMEOUT) < 0) { | 2081 | buf, 0, WDR_TIMEOUT) < 0) { |
2072 | err("%s FAILED to enable/disable break state (state was %d)", | 2082 | dev_err(&port->dev, "%s FAILED to enable/disable break state " |
2073 | __func__, break_state); | 2083 | "(state was %d)\n", __func__, break_state); |
2074 | } | 2084 | } |
2075 | 2085 | ||
2076 | dbg("%s break state is %d - urb is %d", __func__, | 2086 | dbg("%s break state is %d - urb is %d", __func__, |
@@ -2142,7 +2152,7 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2142 | case CS7: urb_value |= 7; dbg("Setting CS7"); break; | 2152 | case CS7: urb_value |= 7; dbg("Setting CS7"); break; |
2143 | case CS8: urb_value |= 8; dbg("Setting CS8"); break; | 2153 | case CS8: urb_value |= 8; dbg("Setting CS8"); break; |
2144 | default: | 2154 | default: |
2145 | err("CSIZE was set but not CS5-CS8"); | 2155 | dev_err(&port->dev, "CSIZE was set but not CS5-CS8\n"); |
2146 | } | 2156 | } |
2147 | } | 2157 | } |
2148 | 2158 | ||
@@ -2155,7 +2165,8 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2155 | FTDI_SIO_SET_DATA_REQUEST_TYPE, | 2165 | FTDI_SIO_SET_DATA_REQUEST_TYPE, |
2156 | urb_value , priv->interface, | 2166 | urb_value , priv->interface, |
2157 | buf, 0, WDR_SHORT_TIMEOUT) < 0) { | 2167 | buf, 0, WDR_SHORT_TIMEOUT) < 0) { |
2158 | err("%s FAILED to set databits/stopbits/parity", __func__); | 2168 | dev_err(&port->dev, "%s FAILED to set " |
2169 | "databits/stopbits/parity\n", __func__); | ||
2159 | } | 2170 | } |
2160 | 2171 | ||
2161 | /* Now do the baudrate */ | 2172 | /* Now do the baudrate */ |
@@ -2166,14 +2177,17 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2166 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, | 2177 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, |
2167 | 0, priv->interface, | 2178 | 0, priv->interface, |
2168 | buf, 0, WDR_TIMEOUT) < 0) { | 2179 | buf, 0, WDR_TIMEOUT) < 0) { |
2169 | err("%s error from disable flowcontrol urb", __func__); | 2180 | dev_err(&port->dev, |
2181 | "%s error from disable flowcontrol urb\n", | ||
2182 | __func__); | ||
2170 | } | 2183 | } |
2171 | /* Drop RTS and DTR */ | 2184 | /* Drop RTS and DTR */ |
2172 | clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); | 2185 | clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); |
2173 | } else { | 2186 | } else { |
2174 | /* set the baudrate determined before */ | 2187 | /* set the baudrate determined before */ |
2175 | if (change_speed(tty, port)) | 2188 | if (change_speed(tty, port)) |
2176 | err("%s urb failed to set baudrate", __func__); | 2189 | dev_err(&port->dev, "%s urb failed to set baudrate\n", |
2190 | __func__); | ||
2177 | /* Ensure RTS and DTR are raised when baudrate changed from 0 */ | 2191 | /* Ensure RTS and DTR are raised when baudrate changed from 0 */ |
2178 | if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) | 2192 | if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) |
2179 | set_mctrl(port, TIOCM_DTR | TIOCM_RTS); | 2193 | set_mctrl(port, TIOCM_DTR | TIOCM_RTS); |
@@ -2189,7 +2203,8 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2189 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, | 2203 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, |
2190 | 0 , (FTDI_SIO_RTS_CTS_HS | priv->interface), | 2204 | 0 , (FTDI_SIO_RTS_CTS_HS | priv->interface), |
2191 | buf, 0, WDR_TIMEOUT) < 0) { | 2205 | buf, 0, WDR_TIMEOUT) < 0) { |
2192 | 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"); | ||
2193 | } | 2208 | } |
2194 | 2209 | ||
2195 | } else { | 2210 | } else { |
@@ -2220,7 +2235,8 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2220 | urb_value , (FTDI_SIO_XON_XOFF_HS | 2235 | urb_value , (FTDI_SIO_XON_XOFF_HS |
2221 | | priv->interface), | 2236 | | priv->interface), |
2222 | buf, 0, WDR_TIMEOUT) < 0) { | 2237 | buf, 0, WDR_TIMEOUT) < 0) { |
2223 | 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"); | ||
2224 | } | 2240 | } |
2225 | } else { | 2241 | } else { |
2226 | /* else clause to only run if cflag ! CRTSCTS and iflag | 2242 | /* else clause to only run if cflag ! CRTSCTS and iflag |
@@ -2233,7 +2249,8 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2233 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, | 2249 | FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, |
2234 | 0, priv->interface, | 2250 | 0, priv->interface, |
2235 | buf, 0, WDR_TIMEOUT) < 0) { | 2251 | buf, 0, WDR_TIMEOUT) < 0) { |
2236 | err("urb failed to clear flow control"); | 2252 | dev_err(&port->dev, |
2253 | "urb failed to clear flow control\n"); | ||
2237 | } | 2254 | } |
2238 | } | 2255 | } |
2239 | 2256 | ||
@@ -2425,7 +2442,8 @@ static int __init ftdi_init(void) | |||
2425 | if (retval) | 2442 | if (retval) |
2426 | goto failed_usb_register; | 2443 | goto failed_usb_register; |
2427 | 2444 | ||
2428 | info(DRIVER_VERSION ":" DRIVER_DESC); | 2445 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
2446 | DRIVER_DESC "\n"); | ||
2429 | return 0; | 2447 | return 0; |
2430 | failed_usb_register: | 2448 | failed_usb_register: |
2431 | usb_serial_deregister(&ftdi_sio_device); | 2449 | usb_serial_deregister(&ftdi_sio_device); |
@@ -2458,5 +2476,5 @@ module_param(vendor, ushort, 0); | |||
2458 | MODULE_PARM_DESC(vendor, "User specified vendor ID (default=" | 2476 | MODULE_PARM_DESC(vendor, "User specified vendor ID (default=" |
2459 | __MODULE_STRING(FTDI_VID)")"); | 2477 | __MODULE_STRING(FTDI_VID)")"); |
2460 | module_param(product, ushort, 0); | 2478 | module_param(product, ushort, 0); |
2461 | MODULE_PARM_DESC(vendor, "User specified product ID"); | 2479 | MODULE_PARM_DESC(product, "User specified product ID"); |
2462 | 2480 | ||
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 8a5b6df3a976..07a3992abad2 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -628,6 +628,11 @@ | |||
628 | #define FTDI_SUUNTO_SPORTS_PID 0xF680 /* Suunto Sports instrument */ | 628 | #define FTDI_SUUNTO_SPORTS_PID 0xF680 /* Suunto Sports instrument */ |
629 | 629 | ||
630 | /* | 630 | /* |
631 | * Oceanic product ids | ||
632 | */ | ||
633 | #define FTDI_OCEANIC_PID 0xF460 /* Oceanic dive instrument */ | ||
634 | |||
635 | /* | ||
631 | * TTi (Thurlby Thandar Instruments) | 636 | * TTi (Thurlby Thandar Instruments) |
632 | */ | 637 | */ |
633 | #define TTI_VID 0x103E /* Vendor Id */ | 638 | #define TTI_VID 0x103E /* Vendor Id */ |
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index 2ad0569bcf19..8e6a66e38db2 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c | |||
@@ -1585,7 +1585,8 @@ static int __init garmin_init(void) | |||
1585 | retval = usb_register(&garmin_driver); | 1585 | retval = usb_register(&garmin_driver); |
1586 | if (retval) | 1586 | if (retval) |
1587 | goto failed_usb_register; | 1587 | goto failed_usb_register; |
1588 | info(DRIVER_DESC " " DRIVER_VERSION); | 1588 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
1589 | DRIVER_DESC "\n"); | ||
1589 | 1590 | ||
1590 | return 0; | 1591 | return 0; |
1591 | failed_usb_register: | 1592 | failed_usb_register: |
diff --git a/drivers/usb/serial/hp4x.c b/drivers/usb/serial/hp4x.c index ab905869e959..431329275133 100644 --- a/drivers/usb/serial/hp4x.c +++ b/drivers/usb/serial/hp4x.c | |||
@@ -63,7 +63,8 @@ static int __init hp49gp_init(void) | |||
63 | retval = usb_register(&hp49gp_driver); | 63 | retval = usb_register(&hp49gp_driver); |
64 | if (retval) | 64 | if (retval) |
65 | goto failed_usb_register; | 65 | goto failed_usb_register; |
66 | info(DRIVER_DESC " " DRIVER_VERSION); | 66 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
67 | DRIVER_DESC "\n"); | ||
67 | return 0; | 68 | return 0; |
68 | failed_usb_register: | 69 | failed_usb_register: |
69 | usb_serial_deregister(&hp49gp_device); | 70 | usb_serial_deregister(&hp49gp_device); |
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 611f97fd62f1..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 | } |
@@ -3253,7 +3255,8 @@ static int __init edgeport_init(void) | |||
3253 | if (retval) | 3255 | if (retval) |
3254 | goto failed_usb_register; | 3256 | goto failed_usb_register; |
3255 | atomic_set(&CmdUrbs, 0); | 3257 | atomic_set(&CmdUrbs, 0); |
3256 | info(DRIVER_DESC " " DRIVER_VERSION); | 3258 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
3259 | DRIVER_DESC "\n"); | ||
3257 | return 0; | 3260 | return 0; |
3258 | 3261 | ||
3259 | failed_usb_register: | 3262 | failed_usb_register: |
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 541dd8e6e7a2..c3cdd00ddc41 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
@@ -2978,7 +2978,8 @@ static int __init edgeport_init(void) | |||
2978 | retval = usb_register(&io_driver); | 2978 | retval = usb_register(&io_driver); |
2979 | if (retval) | 2979 | if (retval) |
2980 | goto failed_usb_register; | 2980 | goto failed_usb_register; |
2981 | info(DRIVER_DESC " " DRIVER_VERSION); | 2981 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
2982 | DRIVER_DESC "\n"); | ||
2982 | return 0; | 2983 | return 0; |
2983 | failed_usb_register: | 2984 | failed_usb_register: |
2984 | usb_serial_deregister(&edgeport_2port_device); | 2985 | usb_serial_deregister(&edgeport_2port_device); |
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 2affa9c118b2..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 | } |
@@ -976,7 +979,6 @@ static int __init ipaq_init(void) | |||
976 | retval = usb_serial_register(&ipaq_device); | 979 | retval = usb_serial_register(&ipaq_device); |
977 | if (retval) | 980 | if (retval) |
978 | goto failed_usb_serial_register; | 981 | goto failed_usb_serial_register; |
979 | info(DRIVER_DESC " " DRIVER_VERSION); | ||
980 | if (vendor) { | 982 | if (vendor) { |
981 | ipaq_id_table[0].idVendor = vendor; | 983 | ipaq_id_table[0].idVendor = vendor; |
982 | ipaq_id_table[0].idProduct = product; | 984 | ipaq_id_table[0].idProduct = product; |
@@ -985,6 +987,8 @@ static int __init ipaq_init(void) | |||
985 | if (retval) | 987 | if (retval) |
986 | goto failed_usb_register; | 988 | goto failed_usb_register; |
987 | 989 | ||
990 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
991 | DRIVER_DESC "\n"); | ||
988 | return 0; | 992 | return 0; |
989 | failed_usb_register: | 993 | failed_usb_register: |
990 | usb_serial_deregister(&ipaq_device); | 994 | usb_serial_deregister(&ipaq_device); |
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c index 480cac27d646..3ac59a8a980f 100644 --- a/drivers/usb/serial/ipw.c +++ b/drivers/usb/serial/ipw.c | |||
@@ -485,7 +485,8 @@ static int usb_ipw_init(void) | |||
485 | usb_serial_deregister(&ipw_device); | 485 | usb_serial_deregister(&ipw_device); |
486 | return retval; | 486 | return retval; |
487 | } | 487 | } |
488 | info(DRIVER_DESC " " DRIVER_VERSION); | 488 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
489 | DRIVER_DESC "\n"); | ||
489 | return 0; | 490 | return 0; |
490 | } | 491 | } |
491 | 492 | ||
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c index 45d4043e04ab..b679a556b98d 100644 --- a/drivers/usb/serial/ir-usb.c +++ b/drivers/usb/serial/ir-usb.c | |||
@@ -602,7 +602,8 @@ static int __init ir_init(void) | |||
602 | if (retval) | 602 | if (retval) |
603 | goto failed_usb_register; | 603 | goto failed_usb_register; |
604 | 604 | ||
605 | info(DRIVER_DESC " " DRIVER_VERSION); | 605 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
606 | DRIVER_DESC "\n"); | ||
606 | 607 | ||
607 | return 0; | 608 | return 0; |
608 | 609 | ||
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 53710aa7eadd..e320972cb227 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c | |||
@@ -1185,7 +1185,8 @@ static int __init iuu_init(void) | |||
1185 | retval = usb_register(&iuu_driver); | 1185 | retval = usb_register(&iuu_driver); |
1186 | if (retval) | 1186 | if (retval) |
1187 | goto failed_usb_register; | 1187 | goto failed_usb_register; |
1188 | info(DRIVER_DESC " " DRIVER_VERSION); | 1188 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
1189 | DRIVER_DESC "\n"); | ||
1189 | return 0; | 1190 | return 0; |
1190 | failed_usb_register: | 1191 | failed_usb_register: |
1191 | usb_serial_deregister(&iuu_device); | 1192 | usb_serial_deregister(&iuu_device); |
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index 15447af48691..9878c0fb3859 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c | |||
@@ -217,7 +217,8 @@ static int __init keyspan_init(void) | |||
217 | if (retval) | 217 | if (retval) |
218 | goto failed_usb_register; | 218 | goto failed_usb_register; |
219 | 219 | ||
220 | info(DRIVER_VERSION ":" DRIVER_DESC); | 220 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
221 | DRIVER_DESC "\n"); | ||
221 | 222 | ||
222 | return 0; | 223 | return 0; |
223 | failed_usb_register: | 224 | failed_usb_register: |
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 99e9a14c5bf6..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); |
@@ -874,7 +876,8 @@ static int __init keyspan_pda_init(void) | |||
874 | retval = usb_register(&keyspan_pda_driver); | 876 | retval = usb_register(&keyspan_pda_driver); |
875 | if (retval) | 877 | if (retval) |
876 | goto failed_usb_register; | 878 | goto failed_usb_register; |
877 | info(DRIVER_DESC " " DRIVER_VERSION); | 879 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
880 | DRIVER_DESC "\n"); | ||
878 | return 0; | 881 | return 0; |
879 | failed_usb_register: | 882 | failed_usb_register: |
880 | #ifdef XIRCOM | 883 | #ifdef XIRCOM |
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index ff3a07f5102f..dc36a052766f 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c | |||
@@ -182,12 +182,12 @@ 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 | info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d", | 186 | "Change port settings failed (error = %d)\n", rc); |
187 | __func__, | 187 | dev_info(&port->serial->dev->dev, |
188 | settings->pktlen, | 188 | "%d byte block, baudrate %x, databits %d, u1 %d, u2 %d\n", |
189 | settings->baudrate, settings->databits, | 189 | settings->pktlen, settings->baudrate, settings->databits, |
190 | settings->unknown1, settings->unknown2); | 190 | settings->unknown1, settings->unknown2); |
191 | return rc; | 191 | return rc; |
192 | } /* klsi_105_chg_port_settings */ | 192 | } /* klsi_105_chg_port_settings */ |
193 | 193 | ||
@@ -215,7 +215,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port, | |||
215 | __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1, -1}; | 215 | __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1, -1}; |
216 | __u16 status; | 216 | __u16 status; |
217 | 217 | ||
218 | info("%s - sending SIO Poll request", __func__); | 218 | dev_info(&port->serial->dev->dev, "sending SIO Poll request\n"); |
219 | rc = usb_control_msg(port->serial->dev, | 219 | rc = usb_control_msg(port->serial->dev, |
220 | usb_rcvctrlpipe(port->serial->dev, 0), | 220 | usb_rcvctrlpipe(port->serial->dev, 0), |
221 | KL5KUSB105A_SIO_POLL, | 221 | KL5KUSB105A_SIO_POLL, |
@@ -226,12 +226,13 @@ static int klsi_105_get_line_state(struct usb_serial_port *port, | |||
226 | 10000 | 226 | 10000 |
227 | ); | 227 | ); |
228 | if (rc < 0) | 228 | if (rc < 0) |
229 | err("Reading line status failed (error = %d)", rc); | 229 | dev_err(&port->dev, "Reading line status failed (error = %d)\n", |
230 | rc); | ||
230 | else { | 231 | else { |
231 | status = get_unaligned_le16(status_buf); | 232 | status = get_unaligned_le16(status_buf); |
232 | 233 | ||
233 | info("%s - read status %x %x", __func__, | 234 | dev_info(&port->serial->dev->dev, "read status %x %x", |
234 | status_buf[0], status_buf[1]); | 235 | status_buf[0], status_buf[1]); |
235 | 236 | ||
236 | *line_state_p = klsi_105_status2linestate(status); | 237 | *line_state_p = klsi_105_status2linestate(status); |
237 | } | 238 | } |
@@ -280,15 +281,16 @@ static int klsi_105_startup(struct usb_serial *serial) | |||
280 | 281 | ||
281 | priv->write_urb_pool[j] = urb; | 282 | priv->write_urb_pool[j] = urb; |
282 | if (urb == NULL) { | 283 | if (urb == NULL) { |
283 | err("No more urbs???"); | 284 | dev_err(&serial->dev->dev, "No more urbs???\n"); |
284 | goto err_cleanup; | 285 | goto err_cleanup; |
285 | } | 286 | } |
286 | 287 | ||
287 | urb->transfer_buffer = | 288 | urb->transfer_buffer = |
288 | kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); | 289 | kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); |
289 | if (!urb->transfer_buffer) { | 290 | if (!urb->transfer_buffer) { |
290 | err("%s - out of memory for urb buffers.", | 291 | dev_err(&serial->dev->dev, |
291 | __func__); | 292 | "%s - out of memory for urb buffers.\n", |
293 | __func__); | ||
292 | goto err_cleanup; | 294 | goto err_cleanup; |
293 | } | 295 | } |
294 | } | 296 | } |
@@ -409,7 +411,8 @@ static int klsi_105_open(struct tty_struct *tty, | |||
409 | 411 | ||
410 | rc = usb_submit_urb(port->read_urb, GFP_KERNEL); | 412 | rc = usb_submit_urb(port->read_urb, GFP_KERNEL); |
411 | if (rc) { | 413 | if (rc) { |
412 | 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); | ||
413 | retval = rc; | 416 | retval = rc; |
414 | goto exit; | 417 | goto exit; |
415 | } | 418 | } |
@@ -424,7 +427,7 @@ static int klsi_105_open(struct tty_struct *tty, | |||
424 | 0, | 427 | 0, |
425 | KLSI_TIMEOUT); | 428 | KLSI_TIMEOUT); |
426 | if (rc < 0) { | 429 | if (rc < 0) { |
427 | err("Enabling read failed (error = %d)", rc); | 430 | dev_err(&port->dev, "Enabling read failed (error = %d)\n", rc); |
428 | retval = rc; | 431 | retval = rc; |
429 | } else | 432 | } else |
430 | dbg("%s - enabled reading", __func__); | 433 | dbg("%s - enabled reading", __func__); |
@@ -464,7 +467,8 @@ static void klsi_105_close(struct tty_struct *tty, | |||
464 | NULL, 0, | 467 | NULL, 0, |
465 | KLSI_TIMEOUT); | 468 | KLSI_TIMEOUT); |
466 | if (rc < 0) | 469 | if (rc < 0) |
467 | err("Disabling read failed (error = %d)", rc); | 470 | dev_err(&port->dev, |
471 | "Disabling read failed (error = %d)\n", rc); | ||
468 | } | 472 | } |
469 | mutex_unlock(&port->serial->disc_mutex); | 473 | mutex_unlock(&port->serial->disc_mutex); |
470 | 474 | ||
@@ -475,8 +479,9 @@ static void klsi_105_close(struct tty_struct *tty, | |||
475 | /* FIXME */ | 479 | /* FIXME */ |
476 | /* wgg - do I need this? I think so. */ | 480 | /* wgg - do I need this? I think so. */ |
477 | usb_kill_urb(port->interrupt_in_urb); | 481 | usb_kill_urb(port->interrupt_in_urb); |
478 | info("kl5kusb105 port stats: %ld bytes in, %ld bytes out", | 482 | dev_info(&port->serial->dev->dev, |
479 | priv->bytes_in, priv->bytes_out); | 483 | "port stats: %ld bytes in, %ld bytes out\n", |
484 | priv->bytes_in, priv->bytes_out); | ||
480 | } /* klsi_105_close */ | 485 | } /* klsi_105_close */ |
481 | 486 | ||
482 | 487 | ||
@@ -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 | ||
@@ -960,7 +972,8 @@ static int __init klsi_105_init(void) | |||
960 | if (retval) | 972 | if (retval) |
961 | goto failed_usb_register; | 973 | goto failed_usb_register; |
962 | 974 | ||
963 | info(DRIVER_DESC " " DRIVER_VERSION); | 975 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
976 | DRIVER_DESC "\n"); | ||
964 | return 0; | 977 | return 0; |
965 | failed_usb_register: | 978 | failed_usb_register: |
966 | usb_serial_deregister(&kl5kusb105d_device); | 979 | usb_serial_deregister(&kl5kusb105d_device); |
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index cfcf37c2b957..6286baad9392 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c | |||
@@ -744,8 +744,8 @@ static int __init kobil_init(void) | |||
744 | if (retval) | 744 | if (retval) |
745 | goto failed_usb_register; | 745 | goto failed_usb_register; |
746 | 746 | ||
747 | info(DRIVER_VERSION " " DRIVER_AUTHOR); | 747 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
748 | info(DRIVER_DESC); | 748 | DRIVER_DESC "\n"); |
749 | 749 | ||
750 | return 0; | 750 | return 0; |
751 | failed_usb_register: | 751 | failed_usb_register: |
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 9b2cef81cde0..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 | } |
@@ -817,7 +826,8 @@ static int __init mct_u232_init(void) | |||
817 | retval = usb_register(&mct_u232_driver); | 826 | retval = usb_register(&mct_u232_driver); |
818 | if (retval) | 827 | if (retval) |
819 | goto failed_usb_register; | 828 | goto failed_usb_register; |
820 | info(DRIVER_DESC " " DRIVER_VERSION); | 829 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
830 | DRIVER_DESC "\n"); | ||
821 | return 0; | 831 | return 0; |
822 | failed_usb_register: | 832 | failed_usb_register: |
823 | usb_serial_deregister(&mct_u232_device); | 833 | usb_serial_deregister(&mct_u232_device); |
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 7b538caec37f..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; |
@@ -1585,7 +1588,8 @@ static int __init moschip7720_init(void) | |||
1585 | if (retval) | 1588 | if (retval) |
1586 | goto failed_port_device_register; | 1589 | goto failed_port_device_register; |
1587 | 1590 | ||
1588 | info(DRIVER_DESC " " DRIVER_VERSION); | 1591 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
1592 | DRIVER_DESC "\n"); | ||
1589 | 1593 | ||
1590 | /* Register with the usb */ | 1594 | /* Register with the usb */ |
1591 | retval = usb_register(&usb_driver); | 1595 | retval = usb_register(&usb_driver); |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 60543d79ef56..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; |
@@ -2743,7 +2745,8 @@ static int __init moschip7840_init(void) | |||
2743 | goto failed_port_device_register; | 2745 | goto failed_port_device_register; |
2744 | 2746 | ||
2745 | dbg("%s\n", "Entring..."); | 2747 | dbg("%s\n", "Entring..."); |
2746 | info(DRIVER_DESC " " DRIVER_VERSION); | 2748 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
2749 | DRIVER_DESC "\n"); | ||
2747 | 2750 | ||
2748 | /* Register with the usb */ | 2751 | /* Register with the usb */ |
2749 | retval = usb_register(&io_driver); | 2752 | retval = usb_register(&io_driver); |
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index c4d70b0f1e48..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 | ||
@@ -364,7 +367,8 @@ static int __init omninet_init(void) | |||
364 | retval = usb_register(&omninet_driver); | 367 | retval = usb_register(&omninet_driver); |
365 | if (retval) | 368 | if (retval) |
366 | goto failed_usb_register; | 369 | goto failed_usb_register; |
367 | info(DRIVER_VERSION ":" DRIVER_DESC); | 370 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
371 | DRIVER_DESC "\n"); | ||
368 | return 0; | 372 | return 0; |
369 | failed_usb_register: | 373 | failed_usb_register: |
370 | usb_serial_deregister(&zyxel_omninet_device); | 374 | usb_serial_deregister(&zyxel_omninet_device); |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 6b1727e751e3..3d87eabcd922 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -79,27 +79,16 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po | |||
79 | #define OPTION_PRODUCT_VIPER 0x6600 | 79 | #define OPTION_PRODUCT_VIPER 0x6600 |
80 | #define OPTION_PRODUCT_VIPER_BUS 0x6601 | 80 | #define OPTION_PRODUCT_VIPER_BUS 0x6601 |
81 | #define OPTION_PRODUCT_GT_MAX_READY 0x6701 | 81 | #define OPTION_PRODUCT_GT_MAX_READY 0x6701 |
82 | #define OPTION_PRODUCT_GT_MAX 0x6711 | ||
83 | #define OPTION_PRODUCT_FUJI_MODEM_LIGHT 0x6721 | 82 | #define OPTION_PRODUCT_FUJI_MODEM_LIGHT 0x6721 |
84 | #define OPTION_PRODUCT_FUJI_MODEM_GT 0x6741 | 83 | #define OPTION_PRODUCT_FUJI_MODEM_GT 0x6741 |
85 | #define OPTION_PRODUCT_FUJI_MODEM_EX 0x6761 | 84 | #define OPTION_PRODUCT_FUJI_MODEM_EX 0x6761 |
86 | #define OPTION_PRODUCT_FUJI_NETWORK_LIGHT 0x6731 | ||
87 | #define OPTION_PRODUCT_FUJI_NETWORK_GT 0x6751 | ||
88 | #define OPTION_PRODUCT_FUJI_NETWORK_EX 0x6771 | ||
89 | #define OPTION_PRODUCT_KOI_MODEM 0x6800 | 85 | #define OPTION_PRODUCT_KOI_MODEM 0x6800 |
90 | #define OPTION_PRODUCT_KOI_NETWORK 0x6811 | ||
91 | #define OPTION_PRODUCT_SCORPION_MODEM 0x6901 | 86 | #define OPTION_PRODUCT_SCORPION_MODEM 0x6901 |
92 | #define OPTION_PRODUCT_SCORPION_NETWORK 0x6911 | ||
93 | #define OPTION_PRODUCT_ETNA_MODEM 0x7001 | 87 | #define OPTION_PRODUCT_ETNA_MODEM 0x7001 |
94 | #define OPTION_PRODUCT_ETNA_NETWORK 0x7011 | ||
95 | #define OPTION_PRODUCT_ETNA_MODEM_LITE 0x7021 | 88 | #define OPTION_PRODUCT_ETNA_MODEM_LITE 0x7021 |
96 | #define OPTION_PRODUCT_ETNA_MODEM_GT 0x7041 | 89 | #define OPTION_PRODUCT_ETNA_MODEM_GT 0x7041 |
97 | #define OPTION_PRODUCT_ETNA_MODEM_EX 0x7061 | 90 | #define OPTION_PRODUCT_ETNA_MODEM_EX 0x7061 |
98 | #define OPTION_PRODUCT_ETNA_NETWORK_LITE 0x7031 | ||
99 | #define OPTION_PRODUCT_ETNA_NETWORK_GT 0x7051 | ||
100 | #define OPTION_PRODUCT_ETNA_NETWORK_EX 0x7071 | ||
101 | #define OPTION_PRODUCT_ETNA_KOI_MODEM 0x7100 | 91 | #define OPTION_PRODUCT_ETNA_KOI_MODEM 0x7100 |
102 | #define OPTION_PRODUCT_ETNA_KOI_NETWORK 0x7111 | ||
103 | 92 | ||
104 | #define HUAWEI_VENDOR_ID 0x12D1 | 93 | #define HUAWEI_VENDOR_ID 0x12D1 |
105 | #define HUAWEI_PRODUCT_E600 0x1001 | 94 | #define HUAWEI_PRODUCT_E600 0x1001 |
@@ -220,6 +209,16 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po | |||
220 | #define ZTE_PRODUCT_MF628 0x0015 | 209 | #define ZTE_PRODUCT_MF628 0x0015 |
221 | #define ZTE_PRODUCT_CDMA_TECH 0xfffe | 210 | #define ZTE_PRODUCT_CDMA_TECH 0xfffe |
222 | 211 | ||
212 | /* Ericsson products */ | ||
213 | #define ERICSSON_VENDOR_ID 0x0bdb | ||
214 | #define ERICSSON_PRODUCT_F3507G 0x1900 | ||
215 | |||
216 | /* Pantech products */ | ||
217 | #define PANTECH_VENDOR_ID 0x106c | ||
218 | #define PANTECH_PRODUCT_PC5740 0x3701 | ||
219 | #define PANTECH_PRODUCT_PC5750 0x3702 /* PX-500 */ | ||
220 | #define PANTECH_PRODUCT_UM150 0x3711 | ||
221 | |||
223 | static struct usb_device_id option_ids[] = { | 222 | static struct usb_device_id option_ids[] = { |
224 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, | 223 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
225 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, | 224 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
@@ -235,27 +234,16 @@ static struct usb_device_id option_ids[] = { | |||
235 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER) }, | 234 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER) }, |
236 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER_BUS) }, | 235 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_VIPER_BUS) }, |
237 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GT_MAX_READY) }, | 236 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GT_MAX_READY) }, |
238 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GT_MAX) }, | ||
239 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_MODEM_LIGHT) }, | 237 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_MODEM_LIGHT) }, |
240 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_MODEM_GT) }, | 238 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_MODEM_GT) }, |
241 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_MODEM_EX) }, | 239 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_MODEM_EX) }, |
242 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_NETWORK_LIGHT) }, | ||
243 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_NETWORK_GT) }, | ||
244 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUJI_NETWORK_EX) }, | ||
245 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_KOI_MODEM) }, | 240 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_KOI_MODEM) }, |
246 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_KOI_NETWORK) }, | ||
247 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_SCORPION_MODEM) }, | 241 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_SCORPION_MODEM) }, |
248 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_SCORPION_NETWORK) }, | ||
249 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM) }, | 242 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM) }, |
250 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK) }, | ||
251 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_LITE) }, | 243 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_LITE) }, |
252 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_GT) }, | 244 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_GT) }, |
253 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_EX) }, | 245 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_EX) }, |
254 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_LITE) }, | ||
255 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_GT) }, | ||
256 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_EX) }, | ||
257 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, | 246 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, |
258 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, | ||
259 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, | 247 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, |
260 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, | 248 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, |
261 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, | 249 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, |
@@ -318,7 +306,8 @@ static struct usb_device_id option_ids[] = { | |||
318 | { USB_DEVICE(DELL_VENDOR_ID, 0x8136) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ | 306 | { USB_DEVICE(DELL_VENDOR_ID, 0x8136) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ |
319 | { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ | 307 | { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ |
320 | { USB_DEVICE(DELL_VENDOR_ID, 0x8138) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */ | 308 | { USB_DEVICE(DELL_VENDOR_ID, 0x8138) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */ |
321 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, | 309 | { USB_DEVICE(DELL_VENDOR_ID, 0x8147) }, /* Dell Wireless 5530 Mobile Broadband (3G HSPA) Mini-Card */ |
310 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ | ||
322 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, | 311 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, |
323 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, | 312 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, |
324 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, | 313 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, |
@@ -349,6 +338,10 @@ static struct usb_device_id option_ids[] = { | |||
349 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, | 338 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, |
350 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, | 339 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, |
351 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, | 340 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, |
341 | { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G) }, | ||
342 | { USB_DEVICE(PANTECH_VENDOR_ID, PANTECH_PRODUCT_PC5740) }, | ||
343 | { USB_DEVICE(PANTECH_VENDOR_ID, PANTECH_PRODUCT_PC5750) }, | ||
344 | { USB_DEVICE(PANTECH_VENDOR_ID, PANTECH_PRODUCT_UM150) }, | ||
352 | { } /* Terminating entry */ | 345 | { } /* Terminating entry */ |
353 | }; | 346 | }; |
354 | MODULE_DEVICE_TABLE(usb, option_ids); | 347 | MODULE_DEVICE_TABLE(usb, option_ids); |
@@ -427,7 +420,8 @@ static int __init option_init(void) | |||
427 | if (retval) | 420 | if (retval) |
428 | goto failed_driver_register; | 421 | goto failed_driver_register; |
429 | 422 | ||
430 | info(DRIVER_DESC ": " DRIVER_VERSION); | 423 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
424 | DRIVER_DESC "\n"); | ||
431 | 425 | ||
432 | return 0; | 426 | return 0; |
433 | 427 | ||
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 908437847165..491c8857b644 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -1147,7 +1147,7 @@ static int __init pl2303_init(void) | |||
1147 | retval = usb_register(&pl2303_driver); | 1147 | retval = usb_register(&pl2303_driver); |
1148 | if (retval) | 1148 | if (retval) |
1149 | goto failed_usb_register; | 1149 | goto failed_usb_register; |
1150 | info(DRIVER_DESC); | 1150 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); |
1151 | return 0; | 1151 | return 0; |
1152 | failed_usb_register: | 1152 | failed_usb_register: |
1153 | usb_serial_deregister(&pl2303_device); | 1153 | usb_serial_deregister(&pl2303_device); |
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 72903ac9f5c0..4b463cd140ef 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c | |||
@@ -250,17 +250,18 @@ static void safe_read_bulk_callback(struct urb *urb) | |||
250 | if (!fcs) { | 250 | if (!fcs) { |
251 | int actual_length = data[length - 2] >> 2; | 251 | int actual_length = data[length - 2] >> 2; |
252 | if (actual_length <= (length - 2)) { | 252 | if (actual_length <= (length - 2)) { |
253 | info("%s - actual: %d", __func__, | 253 | dev_info(&urb->dev->dev, "%s - actual: %d\n", |
254 | actual_length); | 254 | __func__, actual_length); |
255 | tty_insert_flip_string(tty, | 255 | tty_insert_flip_string(tty, |
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); |
@@ -428,14 +431,13 @@ static int __init safe_init(void) | |||
428 | { | 431 | { |
429 | int i, retval; | 432 | int i, retval; |
430 | 433 | ||
431 | info(DRIVER_VERSION " " DRIVER_AUTHOR); | 434 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
432 | info(DRIVER_DESC); | 435 | DRIVER_DESC "\n"); |
433 | info("vendor: %x product: %x safe: %d padded: %d\n", | ||
434 | vendor, product, safe, padded); | ||
435 | 436 | ||
436 | /* if we have vendor / product parameters patch them into id list */ | 437 | /* if we have vendor / product parameters patch them into id list */ |
437 | if (vendor || product) { | 438 | if (vendor || product) { |
438 | info("vendor: %x product: %x\n", vendor, product); | 439 | printk(KERN_INFO KBUILD_MODNAME ": vendor: %x product: %x\n", |
440 | vendor, product); | ||
439 | 441 | ||
440 | for (i = 0; i < ARRAY_SIZE(id_table); i++) { | 442 | for (i = 0; i < ARRAY_SIZE(id_table); i++) { |
441 | if (!id_table[i].idVendor && !id_table[i].idProduct) { | 443 | if (!id_table[i].idVendor && !id_table[i].idProduct) { |
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 8b9eaf383679..0f2b67244af6 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -247,7 +247,7 @@ static int sierra_send_setup(struct tty_struct *tty, | |||
247 | struct sierra_port_private *portdata; | 247 | struct sierra_port_private *portdata; |
248 | __u16 interface = 0; | 248 | __u16 interface = 0; |
249 | 249 | ||
250 | dbg("%s", __func__); | 250 | dev_dbg(&port->dev, "%s", __func__); |
251 | 251 | ||
252 | portdata = usb_get_serial_port_data(port); | 252 | portdata = usb_get_serial_port_data(port); |
253 | 253 | ||
@@ -284,7 +284,7 @@ static int sierra_send_setup(struct tty_struct *tty, | |||
284 | static void sierra_set_termios(struct tty_struct *tty, | 284 | static void sierra_set_termios(struct tty_struct *tty, |
285 | struct usb_serial_port *port, struct ktermios *old_termios) | 285 | struct usb_serial_port *port, struct ktermios *old_termios) |
286 | { | 286 | { |
287 | dbg("%s", __func__); | 287 | dev_dbg(&port->dev, "%s", __func__); |
288 | tty_termios_copy_hw(tty->termios, old_termios); | 288 | tty_termios_copy_hw(tty->termios, old_termios); |
289 | sierra_send_setup(tty, port); | 289 | sierra_send_setup(tty, port); |
290 | } | 290 | } |
@@ -295,6 +295,7 @@ static int sierra_tiocmget(struct tty_struct *tty, struct file *file) | |||
295 | unsigned int value; | 295 | unsigned int value; |
296 | struct sierra_port_private *portdata; | 296 | struct sierra_port_private *portdata; |
297 | 297 | ||
298 | dev_dbg(&port->dev, "%s", __func__); | ||
298 | portdata = usb_get_serial_port_data(port); | 299 | portdata = usb_get_serial_port_data(port); |
299 | 300 | ||
300 | value = ((portdata->rts_state) ? TIOCM_RTS : 0) | | 301 | value = ((portdata->rts_state) ? TIOCM_RTS : 0) | |
@@ -334,14 +335,14 @@ static void sierra_outdat_callback(struct urb *urb) | |||
334 | int status = urb->status; | 335 | int status = urb->status; |
335 | unsigned long flags; | 336 | unsigned long flags; |
336 | 337 | ||
337 | dbg("%s - port %d", __func__, port->number); | 338 | dev_dbg(&port->dev, "%s - port %d", __func__, port->number); |
338 | 339 | ||
339 | /* free up the transfer buffer, as usb_free_urb() does not do this */ | 340 | /* free up the transfer buffer, as usb_free_urb() does not do this */ |
340 | kfree(urb->transfer_buffer); | 341 | kfree(urb->transfer_buffer); |
341 | 342 | ||
342 | if (status) | 343 | if (status) |
343 | dbg("%s - nonzero write bulk status received: %d", | 344 | dev_dbg(&port->dev, "%s - nonzero write bulk status " |
344 | __func__, status); | 345 | "received: %d", __func__, status); |
345 | 346 | ||
346 | spin_lock_irqsave(&portdata->lock, flags); | 347 | spin_lock_irqsave(&portdata->lock, flags); |
347 | --portdata->outstanding_urbs; | 348 | --portdata->outstanding_urbs; |
@@ -363,12 +364,12 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
363 | 364 | ||
364 | portdata = usb_get_serial_port_data(port); | 365 | portdata = usb_get_serial_port_data(port); |
365 | 366 | ||
366 | dbg("%s: write (%d chars)", __func__, count); | 367 | dev_dbg(&port->dev, "%s: write (%d chars)", __func__, count); |
367 | 368 | ||
368 | spin_lock_irqsave(&portdata->lock, flags); | 369 | spin_lock_irqsave(&portdata->lock, flags); |
369 | if (portdata->outstanding_urbs > N_OUT_URB) { | 370 | if (portdata->outstanding_urbs > N_OUT_URB) { |
370 | spin_unlock_irqrestore(&portdata->lock, flags); | 371 | spin_unlock_irqrestore(&portdata->lock, flags); |
371 | dbg("%s - write limit hit\n", __func__); | 372 | dev_dbg(&port->dev, "%s - write limit hit\n", __func__); |
372 | return 0; | 373 | return 0; |
373 | } | 374 | } |
374 | portdata->outstanding_urbs++; | 375 | portdata->outstanding_urbs++; |
@@ -437,8 +438,8 @@ static void sierra_indat_callback(struct urb *urb) | |||
437 | port = urb->context; | 438 | port = urb->context; |
438 | 439 | ||
439 | if (status) { | 440 | if (status) { |
440 | dbg("%s: nonzero status: %d on endpoint %02x.", | 441 | dev_dbg(&port->dev, "%s: nonzero status: %d on" |
441 | __func__, status, endpoint); | 442 | " endpoint %02x.", __func__, status, endpoint); |
442 | } else { | 443 | } else { |
443 | if (urb->actual_length) { | 444 | if (urb->actual_length) { |
444 | tty = tty_port_tty_get(&port->port); | 445 | tty = tty_port_tty_get(&port->port); |
@@ -447,7 +448,8 @@ static void sierra_indat_callback(struct urb *urb) | |||
447 | tty_flip_buffer_push(tty); | 448 | tty_flip_buffer_push(tty); |
448 | tty_kref_put(tty); | 449 | tty_kref_put(tty); |
449 | } else | 450 | } else |
450 | dbg("%s: empty read urb received", __func__); | 451 | dev_dbg(&port->dev, "%s: empty read urb" |
452 | " received", __func__); | ||
451 | 453 | ||
452 | /* Resubmit urb so we continue receiving */ | 454 | /* Resubmit urb so we continue receiving */ |
453 | if (port->port.count && status != -ESHUTDOWN) { | 455 | if (port->port.count && status != -ESHUTDOWN) { |
@@ -468,15 +470,17 @@ static void sierra_instat_callback(struct urb *urb) | |||
468 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); | 470 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); |
469 | struct usb_serial *serial = port->serial; | 471 | struct usb_serial *serial = port->serial; |
470 | 472 | ||
471 | dbg("%s", __func__); | 473 | dev_dbg(&port->dev, "%s", __func__); |
472 | dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata); | 474 | dev_dbg(&port->dev, "%s: urb %p port %p has data %p", __func__, |
475 | urb, port, portdata); | ||
473 | 476 | ||
474 | if (status == 0) { | 477 | if (status == 0) { |
475 | struct usb_ctrlrequest *req_pkt = | 478 | struct usb_ctrlrequest *req_pkt = |
476 | (struct usb_ctrlrequest *)urb->transfer_buffer; | 479 | (struct usb_ctrlrequest *)urb->transfer_buffer; |
477 | 480 | ||
478 | if (!req_pkt) { | 481 | if (!req_pkt) { |
479 | dbg("%s: NULL req_pkt\n", __func__); | 482 | dev_dbg(&port->dev, "%s: NULL req_pkt\n", |
483 | __func__); | ||
480 | return; | 484 | return; |
481 | } | 485 | } |
482 | if ((req_pkt->bRequestType == 0xA1) && | 486 | if ((req_pkt->bRequestType == 0xA1) && |
@@ -487,7 +491,8 @@ static void sierra_instat_callback(struct urb *urb) | |||
487 | sizeof(struct usb_ctrlrequest)); | 491 | sizeof(struct usb_ctrlrequest)); |
488 | struct tty_struct *tty; | 492 | struct tty_struct *tty; |
489 | 493 | ||
490 | dbg("%s: signal x%x", __func__, signals); | 494 | dev_dbg(&port->dev, "%s: signal x%x", __func__, |
495 | signals); | ||
491 | 496 | ||
492 | old_dcd_state = portdata->dcd_state; | 497 | old_dcd_state = portdata->dcd_state; |
493 | portdata->cts_state = 1; | 498 | portdata->cts_state = 1; |
@@ -501,19 +506,20 @@ static void sierra_instat_callback(struct urb *urb) | |||
501 | tty_hangup(tty); | 506 | tty_hangup(tty); |
502 | tty_kref_put(tty); | 507 | tty_kref_put(tty); |
503 | } else { | 508 | } else { |
504 | dbg("%s: type %x req %x", __func__, | 509 | dev_dbg(&port->dev, "%s: type %x req %x", |
505 | req_pkt->bRequestType, req_pkt->bRequest); | 510 | __func__, req_pkt->bRequestType, |
511 | req_pkt->bRequest); | ||
506 | } | 512 | } |
507 | } else | 513 | } else |
508 | dbg("%s: error %d", __func__, status); | 514 | dev_dbg(&port->dev, "%s: error %d", __func__, status); |
509 | 515 | ||
510 | /* Resubmit urb so we continue receiving IRQ data */ | 516 | /* Resubmit urb so we continue receiving IRQ data */ |
511 | if (status != -ESHUTDOWN) { | 517 | if (status != -ESHUTDOWN) { |
512 | urb->dev = serial->dev; | 518 | urb->dev = serial->dev; |
513 | err = usb_submit_urb(urb, GFP_ATOMIC); | 519 | err = usb_submit_urb(urb, GFP_ATOMIC); |
514 | if (err) | 520 | if (err) |
515 | dbg("%s: resubmit intr urb failed. (%d)", | 521 | dev_dbg(&port->dev, "%s: resubmit intr urb " |
516 | __func__, err); | 522 | "failed. (%d)", __func__, err); |
517 | } | 523 | } |
518 | } | 524 | } |
519 | 525 | ||
@@ -523,14 +529,14 @@ static int sierra_write_room(struct tty_struct *tty) | |||
523 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); | 529 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); |
524 | unsigned long flags; | 530 | unsigned long flags; |
525 | 531 | ||
526 | dbg("%s - port %d", __func__, port->number); | 532 | dev_dbg(&port->dev, "%s - port %d", __func__, port->number); |
527 | 533 | ||
528 | /* try to give a good number back based on if we have any free urbs at | 534 | /* try to give a good number back based on if we have any free urbs at |
529 | * this point in time */ | 535 | * this point in time */ |
530 | spin_lock_irqsave(&portdata->lock, flags); | 536 | spin_lock_irqsave(&portdata->lock, flags); |
531 | if (portdata->outstanding_urbs > N_OUT_URB * 2 / 3) { | 537 | if (portdata->outstanding_urbs > N_OUT_URB * 2 / 3) { |
532 | spin_unlock_irqrestore(&portdata->lock, flags); | 538 | spin_unlock_irqrestore(&portdata->lock, flags); |
533 | dbg("%s - write limit hit\n", __func__); | 539 | dev_dbg(&port->dev, "%s - write limit hit\n", __func__); |
534 | return 0; | 540 | return 0; |
535 | } | 541 | } |
536 | spin_unlock_irqrestore(&portdata->lock, flags); | 542 | spin_unlock_irqrestore(&portdata->lock, flags); |
@@ -549,7 +555,7 @@ static int sierra_open(struct tty_struct *tty, | |||
549 | 555 | ||
550 | portdata = usb_get_serial_port_data(port); | 556 | portdata = usb_get_serial_port_data(port); |
551 | 557 | ||
552 | dbg("%s", __func__); | 558 | dev_dbg(&port->dev, "%s", __func__); |
553 | 559 | ||
554 | /* Set some sane defaults */ | 560 | /* Set some sane defaults */ |
555 | portdata->rts_state = 1; | 561 | portdata->rts_state = 1; |
@@ -561,8 +567,8 @@ static int sierra_open(struct tty_struct *tty, | |||
561 | if (!urb) | 567 | if (!urb) |
562 | continue; | 568 | continue; |
563 | if (urb->dev != serial->dev) { | 569 | if (urb->dev != serial->dev) { |
564 | dbg("%s: dev %p != %p", __func__, | 570 | dev_dbg(&port->dev, "%s: dev %p != %p", |
565 | urb->dev, serial->dev); | 571 | __func__, urb->dev, serial->dev); |
566 | continue; | 572 | continue; |
567 | } | 573 | } |
568 | 574 | ||
@@ -601,7 +607,7 @@ static void sierra_close(struct tty_struct *tty, | |||
601 | struct usb_serial *serial = port->serial; | 607 | struct usb_serial *serial = port->serial; |
602 | struct sierra_port_private *portdata; | 608 | struct sierra_port_private *portdata; |
603 | 609 | ||
604 | dbg("%s", __func__); | 610 | dev_dbg(&port->dev, "%s", __func__); |
605 | portdata = usb_get_serial_port_data(port); | 611 | portdata = usb_get_serial_port_data(port); |
606 | 612 | ||
607 | portdata->rts_state = 0; | 613 | portdata->rts_state = 0; |
@@ -630,7 +636,7 @@ static int sierra_startup(struct usb_serial *serial) | |||
630 | int i; | 636 | int i; |
631 | int j; | 637 | int j; |
632 | 638 | ||
633 | dbg("%s", __func__); | 639 | dev_dbg(&serial->dev->dev, "%s", __func__); |
634 | 640 | ||
635 | /* Set Device mode to D0 */ | 641 | /* Set Device mode to D0 */ |
636 | sierra_set_power_state(serial->dev, 0x0000); | 642 | sierra_set_power_state(serial->dev, 0x0000); |
@@ -644,8 +650,9 @@ static int sierra_startup(struct usb_serial *serial) | |||
644 | port = serial->port[i]; | 650 | port = serial->port[i]; |
645 | portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); | 651 | portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); |
646 | if (!portdata) { | 652 | if (!portdata) { |
647 | dbg("%s: kmalloc for sierra_port_private (%d) failed!.", | 653 | dev_dbg(&port->dev, "%s: kmalloc for " |
648 | __func__, i); | 654 | "sierra_port_private (%d) failed!.", |
655 | __func__, i); | ||
649 | return -ENOMEM; | 656 | return -ENOMEM; |
650 | } | 657 | } |
651 | spin_lock_init(&portdata->lock); | 658 | spin_lock_init(&portdata->lock); |
@@ -665,8 +672,8 @@ static int sierra_startup(struct usb_serial *serial) | |||
665 | for (j = 0; j < N_IN_URB; ++j) { | 672 | for (j = 0; j < N_IN_URB; ++j) { |
666 | urb = usb_alloc_urb(0, GFP_KERNEL); | 673 | urb = usb_alloc_urb(0, GFP_KERNEL); |
667 | if (urb == NULL) { | 674 | if (urb == NULL) { |
668 | dbg("%s: alloc for in port failed.", | 675 | dev_dbg(&port->dev, "%s: alloc for in " |
669 | __func__); | 676 | "port failed.", __func__); |
670 | continue; | 677 | continue; |
671 | } | 678 | } |
672 | /* Fill URB using supplied data. */ | 679 | /* Fill URB using supplied data. */ |
@@ -688,7 +695,7 @@ static void sierra_shutdown(struct usb_serial *serial) | |||
688 | struct usb_serial_port *port; | 695 | struct usb_serial_port *port; |
689 | struct sierra_port_private *portdata; | 696 | struct sierra_port_private *portdata; |
690 | 697 | ||
691 | dbg("%s", __func__); | 698 | dev_dbg(&serial->dev->dev, "%s", __func__); |
692 | 699 | ||
693 | for (i = 0; i < serial->num_ports; ++i) { | 700 | for (i = 0; i < serial->num_ports; ++i) { |
694 | port = serial->port[i]; | 701 | port = serial->port[i]; |
@@ -743,7 +750,8 @@ static int __init sierra_init(void) | |||
743 | if (retval) | 750 | if (retval) |
744 | goto failed_driver_register; | 751 | goto failed_driver_register; |
745 | 752 | ||
746 | info(DRIVER_DESC ": " DRIVER_VERSION); | 753 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
754 | DRIVER_DESC "\n"); | ||
747 | 755 | ||
748 | return 0; | 756 | return 0; |
749 | 757 | ||
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index 1533d6e12238..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) { |
@@ -1054,7 +1055,8 @@ static int __init spcp8x5_init(void) | |||
1054 | retval = usb_register(&spcp8x5_driver); | 1055 | retval = usb_register(&spcp8x5_driver); |
1055 | if (retval) | 1056 | if (retval) |
1056 | goto failed_usb_register; | 1057 | goto failed_usb_register; |
1057 | info(DRIVER_DESC " " DRIVER_VERSION); | 1058 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
1059 | DRIVER_DESC "\n"); | ||
1058 | return 0; | 1060 | return 0; |
1059 | failed_usb_register: | 1061 | failed_usb_register: |
1060 | usb_serial_deregister(&spcp8x5_device); | 1062 | usb_serial_deregister(&spcp8x5_device); |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index c90237d48b0e..31c42d1cae13 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -85,7 +85,6 @@ | |||
85 | #include <linux/uaccess.h> | 85 | #include <linux/uaccess.h> |
86 | #include <linux/usb.h> | 86 | #include <linux/usb.h> |
87 | #include <linux/usb/serial.h> | 87 | #include <linux/usb/serial.h> |
88 | #include <linux/firmware.h> | ||
89 | 88 | ||
90 | #include "ti_usb_3410_5052.h" | 89 | #include "ti_usb_3410_5052.h" |
91 | 90 | ||
@@ -383,7 +382,8 @@ static int __init ti_init(void) | |||
383 | if (ret) | 382 | if (ret) |
384 | goto failed_usb; | 383 | goto failed_usb; |
385 | 384 | ||
386 | info(TI_DRIVER_DESC " " TI_DRIVER_VERSION); | 385 | printk(KERN_INFO KBUILD_MODNAME ": " TI_DRIVER_VERSION ":" |
386 | TI_DRIVER_DESC "\n"); | ||
387 | 387 | ||
388 | return 0; | 388 | return 0; |
389 | 389 | ||
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index e7d4246027b2..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,25 +1143,28 @@ 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 | ||
1163 | info(DRIVER_DESC); | 1167 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); |
1164 | 1168 | ||
1165 | return result; | 1169 | return result; |
1166 | 1170 | ||
@@ -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,11 +1238,11 @@ 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 | info("USB Serial support registered for %s", | 1245 | printk(KERN_INFO "USB Serial support registered for %s\n", |
1241 | driver->description); | 1246 | driver->description); |
1242 | 1247 | ||
1243 | return retval; | 1248 | return retval; |
@@ -1248,7 +1253,8 @@ EXPORT_SYMBOL_GPL(usb_serial_register); | |||
1248 | void usb_serial_deregister(struct usb_serial_driver *device) | 1253 | void usb_serial_deregister(struct usb_serial_driver *device) |
1249 | { | 1254 | { |
1250 | /* must be called with BKL held */ | 1255 | /* must be called with BKL held */ |
1251 | info("USB Serial deregistering driver %s", device->description); | 1256 | printk(KERN_INFO "USB Serial deregistering driver %s\n", |
1257 | device->description); | ||
1252 | list_del(&device->driver_list); | 1258 | list_del(&device->driver_list); |
1253 | usb_serial_bus_deregister(device); | 1259 | usb_serial_bus_deregister(device); |
1254 | } | 1260 | } |
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index a6d1c75a1c89..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 | } |
@@ -971,11 +971,14 @@ static int __init visor_init(void) | |||
971 | break; | 971 | break; |
972 | } | 972 | } |
973 | } | 973 | } |
974 | info( | 974 | printk(KERN_INFO KBUILD_MODNAME |
975 | "Untested USB device specified at time of module insertion"); | 975 | ": Untested USB device specified at time of module insertion\n"); |
976 | info("Warning: This is not guaranteed to work"); | 976 | printk(KERN_INFO KBUILD_MODNAME |
977 | info("Using a newer kernel is preferred to this method"); | 977 | ": Warning: This is not guaranteed to work\n"); |
978 | info("Adding Palm OS protocol 4.x support for unknown device: 0x%x/0x%x", | 978 | printk(KERN_INFO KBUILD_MODNAME |
979 | ": Using a newer kernel is preferred to this method\n"); | ||
980 | printk(KERN_INFO KBUILD_MODNAME | ||
981 | ": Adding Palm OS protocol 4.x support for unknown device: 0x%x/0x%x\n", | ||
979 | vendor, product); | 982 | vendor, product); |
980 | } | 983 | } |
981 | retval = usb_serial_register(&handspring_device); | 984 | retval = usb_serial_register(&handspring_device); |
@@ -990,7 +993,7 @@ static int __init visor_init(void) | |||
990 | retval = usb_register(&visor_driver); | 993 | retval = usb_register(&visor_driver); |
991 | if (retval) | 994 | if (retval) |
992 | goto failed_usb_register; | 995 | goto failed_usb_register; |
993 | info(DRIVER_DESC); | 996 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); |
994 | 997 | ||
995 | return 0; | 998 | return 0; |
996 | failed_usb_register: | 999 | failed_usb_register: |
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 11c8b97a5177..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,31 +445,33 @@ 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 | ||
453 | hw_info = (struct whiteheat_hw_info *)&result[1]; | 461 | hw_info = (struct whiteheat_hw_info *)&result[1]; |
454 | 462 | ||
455 | info("%s: Driver %s: Firmware v%d.%02d", serial->type->description, | 463 | dev_info(&serial->dev->dev, "%s: Driver %s: Firmware v%d.%02d\n", |
456 | DRIVER_VERSION, hw_info->sw_major_rev, hw_info->sw_minor_rev); | 464 | serial->type->description, DRIVER_VERSION, |
465 | hw_info->sw_major_rev, hw_info->sw_minor_rev); | ||
457 | 466 | ||
458 | for (i = 0; i < serial->num_ports; i++) { | 467 | for (i = 0; i < serial->num_ports; i++) { |
459 | port = serial->port[i]; | 468 | port = serial->port[i]; |
460 | 469 | ||
461 | info = kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL); | 470 | info = kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL); |
462 | if (info == NULL) { | 471 | if (info == NULL) { |
463 | err("%s: Out of memory for port structures\n", | 472 | dev_err(&port->dev, |
464 | serial->type->description); | 473 | "%s: Out of memory for port structures\n", |
474 | serial->type->description); | ||
465 | goto no_private; | 475 | goto no_private; |
466 | } | 476 | } |
467 | 477 | ||
@@ -481,18 +491,20 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
481 | for (j = 0; j < urb_pool_size; j++) { | 491 | for (j = 0; j < urb_pool_size; j++) { |
482 | urb = usb_alloc_urb(0, GFP_KERNEL); | 492 | urb = usb_alloc_urb(0, GFP_KERNEL); |
483 | if (!urb) { | 493 | if (!urb) { |
484 | err("No free urbs available"); | 494 | dev_err(&port->dev, "No free urbs available\n"); |
485 | goto no_rx_urb; | 495 | goto no_rx_urb; |
486 | } | 496 | } |
487 | buf_size = port->read_urb->transfer_buffer_length; | 497 | buf_size = port->read_urb->transfer_buffer_length; |
488 | urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL); | 498 | urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL); |
489 | if (!urb->transfer_buffer) { | 499 | if (!urb->transfer_buffer) { |
490 | err("Couldn't allocate urb buffer"); | 500 | dev_err(&port->dev, |
501 | "Couldn't allocate urb buffer\n"); | ||
491 | goto no_rx_buf; | 502 | goto no_rx_buf; |
492 | } | 503 | } |
493 | wrap = kmalloc(sizeof(*wrap), GFP_KERNEL); | 504 | wrap = kmalloc(sizeof(*wrap), GFP_KERNEL); |
494 | if (!wrap) { | 505 | if (!wrap) { |
495 | err("Couldn't allocate urb wrapper"); | 506 | dev_err(&port->dev, |
507 | "Couldn't allocate urb wrapper\n"); | ||
496 | goto no_rx_wrap; | 508 | goto no_rx_wrap; |
497 | } | 509 | } |
498 | usb_fill_bulk_urb(urb, serial->dev, | 510 | usb_fill_bulk_urb(urb, serial->dev, |
@@ -505,18 +517,20 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
505 | 517 | ||
506 | urb = usb_alloc_urb(0, GFP_KERNEL); | 518 | urb = usb_alloc_urb(0, GFP_KERNEL); |
507 | if (!urb) { | 519 | if (!urb) { |
508 | err("No free urbs available"); | 520 | dev_err(&port->dev, "No free urbs available\n"); |
509 | goto no_tx_urb; | 521 | goto no_tx_urb; |
510 | } | 522 | } |
511 | buf_size = port->write_urb->transfer_buffer_length; | 523 | buf_size = port->write_urb->transfer_buffer_length; |
512 | urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL); | 524 | urb->transfer_buffer = kmalloc(buf_size, GFP_KERNEL); |
513 | if (!urb->transfer_buffer) { | 525 | if (!urb->transfer_buffer) { |
514 | err("Couldn't allocate urb buffer"); | 526 | dev_err(&port->dev, |
527 | "Couldn't allocate urb buffer\n"); | ||
515 | goto no_tx_buf; | 528 | goto no_tx_buf; |
516 | } | 529 | } |
517 | wrap = kmalloc(sizeof(*wrap), GFP_KERNEL); | 530 | wrap = kmalloc(sizeof(*wrap), GFP_KERNEL); |
518 | if (!wrap) { | 531 | if (!wrap) { |
519 | err("Couldn't allocate urb wrapper"); | 532 | dev_err(&port->dev, |
533 | "Couldn't allocate urb wrapper\n"); | ||
520 | goto no_tx_wrap; | 534 | goto no_tx_wrap; |
521 | } | 535 | } |
522 | usb_fill_bulk_urb(urb, serial->dev, | 536 | usb_fill_bulk_urb(urb, serial->dev, |
@@ -534,8 +548,9 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
534 | command_info = kmalloc(sizeof(struct whiteheat_command_private), | 548 | command_info = kmalloc(sizeof(struct whiteheat_command_private), |
535 | GFP_KERNEL); | 549 | GFP_KERNEL); |
536 | if (command_info == NULL) { | 550 | if (command_info == NULL) { |
537 | err("%s: Out of memory for port structures\n", | 551 | dev_err(&serial->dev->dev, |
538 | serial->type->description); | 552 | "%s: Out of memory for port structures\n", |
553 | serial->type->description); | ||
539 | goto no_command_private; | 554 | goto no_command_private; |
540 | } | 555 | } |
541 | 556 | ||
@@ -552,12 +567,15 @@ static int whiteheat_attach(struct usb_serial *serial) | |||
552 | 567 | ||
553 | no_firmware: | 568 | no_firmware: |
554 | /* Firmware likely not running */ | 569 | /* Firmware likely not running */ |
555 | err("%s: Unable to retrieve firmware version, try replugging\n", | 570 | dev_err(&serial->dev->dev, |
556 | serial->type->description); | 571 | "%s: Unable to retrieve firmware version, try replugging\n", |
557 | err("%s: If the firmware is not running (status led not blinking)\n", | 572 | serial->type->description); |
558 | serial->type->description); | 573 | dev_err(&serial->dev->dev, |
559 | err("%s: please contact support@connecttech.com\n", | 574 | "%s: If the firmware is not running (status led not blinking)\n", |
560 | 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); | ||
561 | kfree(result); | 579 | kfree(result); |
562 | return -ENODEV; | 580 | return -ENODEV; |
563 | 581 | ||
@@ -680,8 +698,9 @@ static int whiteheat_open(struct tty_struct *tty, | |||
680 | /* Start reading from the device */ | 698 | /* Start reading from the device */ |
681 | retval = start_port_read(port); | 699 | retval = start_port_read(port); |
682 | if (retval) { | 700 | if (retval) { |
683 | err("%s - failed submitting read urb, error %d", | 701 | dev_err(&port->dev, |
684 | __func__, retval); | 702 | "%s - failed submitting read urb, error %d\n", |
703 | __func__, retval); | ||
685 | firm_close(port); | 704 | firm_close(port); |
686 | stop_command_port(port->serial); | 705 | stop_command_port(port->serial); |
687 | goto exit; | 706 | goto exit; |
@@ -806,8 +825,9 @@ static int whiteheat_write(struct tty_struct *tty, | |||
806 | urb->transfer_buffer_length = bytes; | 825 | urb->transfer_buffer_length = bytes; |
807 | result = usb_submit_urb(urb, GFP_ATOMIC); | 826 | result = usb_submit_urb(urb, GFP_ATOMIC); |
808 | if (result) { | 827 | if (result) { |
809 | err("%s - failed submitting write urb, error %d", | 828 | dev_err(&port->dev, |
810 | __func__, result); | 829 | "%s - failed submitting write urb, error %d\n", |
830 | __func__, result); | ||
811 | sent = result; | 831 | sent = result; |
812 | spin_lock_irqsave(&info->lock, flags); | 832 | spin_lock_irqsave(&info->lock, flags); |
813 | list_add(tmp, &info->tx_urbs_free); | 833 | list_add(tmp, &info->tx_urbs_free); |
@@ -1075,7 +1095,7 @@ static void whiteheat_read_callback(struct urb *urb) | |||
1075 | wrap = urb_to_wrap(urb, &info->rx_urbs_submitted); | 1095 | wrap = urb_to_wrap(urb, &info->rx_urbs_submitted); |
1076 | if (!wrap) { | 1096 | if (!wrap) { |
1077 | spin_unlock(&info->lock); | 1097 | spin_unlock(&info->lock); |
1078 | err("%s - Not my urb!", __func__); | 1098 | dev_err(&port->dev, "%s - Not my urb!\n", __func__); |
1079 | return; | 1099 | return; |
1080 | } | 1100 | } |
1081 | list_del(&wrap->list); | 1101 | list_del(&wrap->list); |
@@ -1119,7 +1139,7 @@ static void whiteheat_write_callback(struct urb *urb) | |||
1119 | wrap = urb_to_wrap(urb, &info->tx_urbs_submitted); | 1139 | wrap = urb_to_wrap(urb, &info->tx_urbs_submitted); |
1120 | if (!wrap) { | 1140 | if (!wrap) { |
1121 | spin_unlock(&info->lock); | 1141 | spin_unlock(&info->lock); |
1122 | err("%s - Not my urb!", __func__); | 1142 | dev_err(&port->dev, "%s - Not my urb!\n", __func__); |
1123 | return; | 1143 | return; |
1124 | } | 1144 | } |
1125 | list_move(&wrap->list, &info->tx_urbs_free); | 1145 | list_move(&wrap->list, &info->tx_urbs_free); |
@@ -1383,8 +1403,9 @@ static int start_command_port(struct usb_serial *serial) | |||
1383 | command_port->read_urb->dev = serial->dev; | 1403 | command_port->read_urb->dev = serial->dev; |
1384 | retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL); | 1404 | retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL); |
1385 | if (retval) { | 1405 | if (retval) { |
1386 | err("%s - failed submitting read urb, error %d", | 1406 | dev_err(&serial->dev->dev, |
1387 | __func__, retval); | 1407 | "%s - failed submitting read urb, error %d\n", |
1408 | __func__, retval); | ||
1388 | goto exit; | 1409 | goto exit; |
1389 | } | 1410 | } |
1390 | } | 1411 | } |
@@ -1522,7 +1543,8 @@ static void rx_data_softint(struct work_struct *work) | |||
1522 | urb->dev = port->serial->dev; | 1543 | urb->dev = port->serial->dev; |
1523 | result = usb_submit_urb(urb, GFP_ATOMIC); | 1544 | result = usb_submit_urb(urb, GFP_ATOMIC); |
1524 | if (result) { | 1545 | if (result) { |
1525 | err("%s - failed resubmitting read urb, error %d", | 1546 | dev_err(&port->dev, |
1547 | "%s - failed resubmitting read urb, error %d\n", | ||
1526 | __func__, result); | 1548 | __func__, result); |
1527 | spin_lock_irqsave(&info->lock, flags); | 1549 | spin_lock_irqsave(&info->lock, flags); |
1528 | list_add(tmp, &info->rx_urbs_free); | 1550 | list_add(tmp, &info->rx_urbs_free); |
@@ -1556,7 +1578,8 @@ static int __init whiteheat_init(void) | |||
1556 | retval = usb_register(&whiteheat_driver); | 1578 | retval = usb_register(&whiteheat_driver); |
1557 | if (retval) | 1579 | if (retval) |
1558 | goto failed_usb_register; | 1580 | goto failed_usb_register; |
1559 | info(DRIVER_DESC " " DRIVER_VERSION); | 1581 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
1582 | DRIVER_DESC "\n"); | ||
1560 | return 0; | 1583 | return 0; |
1561 | failed_usb_register: | 1584 | failed_usb_register: |
1562 | usb_serial_deregister(&whiteheat_device); | 1585 | usb_serial_deregister(&whiteheat_device); |