aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mct_u232.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/mct_u232.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/mct_u232.c')
-rw-r--r--drivers/usb/serial/mct_u232.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index 29fa66ea2d21..07710cf31d0d 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -246,7 +246,8 @@ static int mct_u232_set_baud_rate(struct tty_struct *tty,
246 0, 0, &divisor, MCT_U232_SET_BAUD_RATE_SIZE, 246 0, 0, &divisor, MCT_U232_SET_BAUD_RATE_SIZE,
247 WDR_TIMEOUT); 247 WDR_TIMEOUT);
248 if (rc < 0) /*FIXME: What value speed results */ 248 if (rc < 0) /*FIXME: What value speed results */
249 err("Set BAUD RATE %d failed (error = %d)", value, rc); 249 dev_err(&port->dev, "Set BAUD RATE %d failed (error = %d)\n",
250 value, rc);
250 else 251 else
251 tty_encode_baud_rate(tty, speed, speed); 252 tty_encode_baud_rate(tty, speed, speed);
252 dbg("set_baud_rate: value: 0x%x, divisor: 0x%x", value, divisor); 253 dbg("set_baud_rate: value: 0x%x, divisor: 0x%x", value, divisor);
@@ -274,8 +275,9 @@ static int mct_u232_set_baud_rate(struct tty_struct *tty,
274 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN1_SIZE, 275 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN1_SIZE,
275 WDR_TIMEOUT); 276 WDR_TIMEOUT);
276 if (rc < 0) 277 if (rc < 0)
277 err("Sending USB device request code %d failed (error = %d)", 278 dev_err(&port->dev, "Sending USB device request code %d "
278 MCT_U232_SET_UNKNOWN1_REQUEST, rc); 279 "failed (error = %d)\n", MCT_U232_SET_UNKNOWN1_REQUEST,
280 rc);
279 281
280 if (port && C_CRTSCTS(tty)) 282 if (port && C_CRTSCTS(tty))
281 cts_enable_byte = 1; 283 cts_enable_byte = 1;
@@ -288,8 +290,8 @@ static int mct_u232_set_baud_rate(struct tty_struct *tty,
288 0, 0, &cts_enable_byte, MCT_U232_SET_CTS_SIZE, 290 0, 0, &cts_enable_byte, MCT_U232_SET_CTS_SIZE,
289 WDR_TIMEOUT); 291 WDR_TIMEOUT);
290 if (rc < 0) 292 if (rc < 0)
291 err("Sending USB device request code %d failed (error = %d)", 293 dev_err(&port->dev, "Sending USB device request code %d "
292 MCT_U232_SET_CTS_REQUEST, rc); 294 "failed (error = %d)\n", MCT_U232_SET_CTS_REQUEST, rc);
293 295
294 return rc; 296 return rc;
295} /* mct_u232_set_baud_rate */ 297} /* mct_u232_set_baud_rate */
@@ -303,7 +305,8 @@ static int mct_u232_set_line_ctrl(struct usb_serial *serial, unsigned char lcr)
303 0, 0, &lcr, MCT_U232_SET_LINE_CTRL_SIZE, 305 0, 0, &lcr, MCT_U232_SET_LINE_CTRL_SIZE,
304 WDR_TIMEOUT); 306 WDR_TIMEOUT);
305 if (rc < 0) 307 if (rc < 0)
306 err("Set LINE CTRL 0x%x failed (error = %d)", lcr, rc); 308 dev_err(&serial->dev->dev,
309 "Set LINE CTRL 0x%x failed (error = %d)\n", lcr, rc);
307 dbg("set_line_ctrl: 0x%x", lcr); 310 dbg("set_line_ctrl: 0x%x", lcr);
308 return rc; 311 return rc;
309} /* mct_u232_set_line_ctrl */ 312} /* mct_u232_set_line_ctrl */
@@ -325,7 +328,8 @@ static int mct_u232_set_modem_ctrl(struct usb_serial *serial,
325 0, 0, &mcr, MCT_U232_SET_MODEM_CTRL_SIZE, 328 0, 0, &mcr, MCT_U232_SET_MODEM_CTRL_SIZE,
326 WDR_TIMEOUT); 329 WDR_TIMEOUT);
327 if (rc < 0) 330 if (rc < 0)
328 err("Set MODEM CTRL 0x%x failed (error = %d)", mcr, rc); 331 dev_err(&serial->dev->dev,
332 "Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc);
329 dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr); 333 dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr);
330 334
331 return rc; 335 return rc;
@@ -341,7 +345,8 @@ static int mct_u232_get_modem_stat(struct usb_serial *serial,
341 0, 0, msr, MCT_U232_GET_MODEM_STAT_SIZE, 345 0, 0, msr, MCT_U232_GET_MODEM_STAT_SIZE,
342 WDR_TIMEOUT); 346 WDR_TIMEOUT);
343 if (rc < 0) { 347 if (rc < 0) {
344 err("Get MODEM STATus failed (error = %d)", rc); 348 dev_err(&serial->dev->dev,
349 "Get MODEM STATus failed (error = %d)\n", rc);
345 *msr = 0; 350 *msr = 0;
346 } 351 }
347 dbg("get_modem_stat: 0x%x", *msr); 352 dbg("get_modem_stat: 0x%x", *msr);
@@ -470,8 +475,9 @@ static int mct_u232_open(struct tty_struct *tty,
470 port->read_urb->dev = port->serial->dev; 475 port->read_urb->dev = port->serial->dev;
471 retval = usb_submit_urb(port->read_urb, GFP_KERNEL); 476 retval = usb_submit_urb(port->read_urb, GFP_KERNEL);
472 if (retval) { 477 if (retval) {
473 err("usb_submit_urb(read bulk) failed pipe 0x%x err %d", 478 dev_err(&port->dev,
474 port->read_urb->pipe, retval); 479 "usb_submit_urb(read bulk) failed pipe 0x%x err %d\n",
480 port->read_urb->pipe, retval);
475 goto error; 481 goto error;
476 } 482 }
477 483
@@ -479,8 +485,9 @@ static int mct_u232_open(struct tty_struct *tty,
479 retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 485 retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
480 if (retval) { 486 if (retval) {
481 usb_kill_urb(port->read_urb); 487 usb_kill_urb(port->read_urb);
482 err(" usb_submit_urb(read int) failed pipe 0x%x err %d", 488 dev_err(&port->dev,
483 port->interrupt_in_urb->pipe, retval); 489 "usb_submit_urb(read int) failed pipe 0x%x err %d",
490 port->interrupt_in_urb->pipe, retval);
484 goto error; 491 goto error;
485 } 492 }
486 return 0; 493 return 0;
@@ -612,8 +619,9 @@ static void mct_u232_read_int_callback(struct urb *urb)
612exit: 619exit:
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
619static void mct_u232_set_termios(struct tty_struct *tty, 627static 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 }