提交 d2f20e12 编写于 作者: G Greg Kroah-Hartman

USB: ark3116.c: remove dbg() usage

dbg() is a usb-serial specific macro.  This patch converts
the ark3116.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
CC: Bart Hartgers <bart.hartgers@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 66afb5b5
...@@ -265,7 +265,7 @@ static void ark3116_set_termios(struct tty_struct *tty, ...@@ -265,7 +265,7 @@ static void ark3116_set_termios(struct tty_struct *tty,
hcr = (cflag & CRTSCTS) ? 0x03 : 0x00; hcr = (cflag & CRTSCTS) ? 0x03 : 0x00;
/* calc baudrate */ /* calc baudrate */
dbg("%s - setting bps to %d", __func__, bps); dev_dbg(&port->dev, "%s - setting bps to %d\n", __func__, bps);
eval = 0; eval = 0;
switch (bps) { switch (bps) {
case 0: case 0:
...@@ -292,8 +292,8 @@ static void ark3116_set_termios(struct tty_struct *tty, ...@@ -292,8 +292,8 @@ static void ark3116_set_termios(struct tty_struct *tty,
/* keep old LCR_SBC bit */ /* keep old LCR_SBC bit */
lcr |= (priv->lcr & UART_LCR_SBC); lcr |= (priv->lcr & UART_LCR_SBC);
dbg("%s - setting hcr:0x%02x,lcr:0x%02x,quot:%d", dev_dbg(&port->dev, "%s - setting hcr:0x%02x,lcr:0x%02x,quot:%d\n",
__func__, hcr, lcr, quot); __func__, hcr, lcr, quot);
/* handshake control */ /* handshake control */
if (priv->hcr != hcr) { if (priv->hcr != hcr) {
...@@ -375,8 +375,9 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -375,8 +375,9 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)
result = usb_serial_generic_open(tty, port); result = usb_serial_generic_open(tty, port);
if (result) { if (result) {
dbg("%s - usb_serial_generic_open failed: %d", dev_dbg(&port->dev,
__func__, result); "%s - usb_serial_generic_open failed: %d\n",
__func__, result);
goto err_out; goto err_out;
} }
...@@ -622,24 +623,26 @@ static void ark3116_read_int_callback(struct urb *urb) ...@@ -622,24 +623,26 @@ static void ark3116_read_int_callback(struct urb *urb)
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
/* this urb is terminated, clean up */ /* this urb is terminated, clean up */
dbg("%s - urb shutting down with status: %d", dev_dbg(&port->dev, "%s - urb shutting down with status: %d\n",
__func__, status); __func__, status);
return; return;
default: default:
dbg("%s - nonzero urb status received: %d", dev_dbg(&port->dev, "%s - nonzero urb status received: %d\n",
__func__, status); __func__, status);
break; break;
case 0: /* success */ case 0: /* success */
/* discovered this by trail and error... */ /* discovered this by trail and error... */
if ((urb->actual_length == 4) && (data[0] == 0xe8)) { if ((urb->actual_length == 4) && (data[0] == 0xe8)) {
const __u8 id = data[1]&UART_IIR_ID; const __u8 id = data[1]&UART_IIR_ID;
dbg("%s: iir=%02x", __func__, data[1]); dev_dbg(&port->dev, "%s: iir=%02x\n", __func__, data[1]);
if (id == UART_IIR_MSI) { if (id == UART_IIR_MSI) {
dbg("%s: msr=%02x", __func__, data[3]); dev_dbg(&port->dev, "%s: msr=%02x\n",
__func__, data[3]);
ark3116_update_msr(port, data[3]); ark3116_update_msr(port, data[3]);
break; break;
} else if (id == UART_IIR_RLSI) { } else if (id == UART_IIR_RLSI) {
dbg("%s: lsr=%02x", __func__, data[2]); dev_dbg(&port->dev, "%s: lsr=%02x\n",
__func__, data[2]);
ark3116_update_lsr(port, data[2]); ark3116_update_lsr(port, data[2]);
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册