aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/belkin_sa.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-08-20 19:56:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-17 17:41:10 -0400
commit194343d9364ea07c9f27c4505380a15a905e8a24 (patch)
tree9c3336daa16fb74f8c669357a7850c2c1452ad8e /drivers/usb/serial/belkin_sa.c
parentb887265c165f94917d0f565b1883a6e7b3c8388c (diff)
USB: remove use of err() in drivers/usb/serial
err() is going away, so switch to dev_err() or printk() if it's really needed. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/belkin_sa.c')
-rw-r--r--drivers/usb/serial/belkin_sa.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index bb19f1c2e0d3..b7eacad4d48c 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -228,7 +228,7 @@ static int belkin_sa_open(struct tty_struct *tty,
228 port->read_urb->dev = port->serial->dev; 228 port->read_urb->dev = port->serial->dev;
229 retval = usb_submit_urb(port->read_urb, GFP_KERNEL); 229 retval = usb_submit_urb(port->read_urb, GFP_KERNEL);
230 if (retval) { 230 if (retval) {
231 err("usb_submit_urb(read bulk) failed"); 231 dev_err(&port->dev, "usb_submit_urb(read bulk) failed\n");
232 goto exit; 232 goto exit;
233 } 233 }
234 234
@@ -236,7 +236,7 @@ static int belkin_sa_open(struct tty_struct *tty,
236 retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 236 retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
237 if (retval) { 237 if (retval) {
238 usb_kill_urb(port->read_urb); 238 usb_kill_urb(port->read_urb);
239 err(" usb_submit_urb(read int) failed"); 239 dev_err(&port->dev, "usb_submit_urb(read int) failed\n");
240 } 240 }
241 241
242exit: 242exit:
@@ -342,8 +342,8 @@ static void belkin_sa_read_int_callback(struct urb *urb)
342exit: 342exit:
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
349static void belkin_sa_set_termios(struct tty_struct *tty, 349static 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 }
566exit: 566exit: