diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-14 16:47:39 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-14 16:47:39 (GMT) |
commit | f9dfbebb8b39b692474a30e9430073577dd88d7c (patch) | |
tree | e533c48e4300ce900826a7a1356388da8fe284a5 /drivers/usb/serial/digi_acceleport.c | |
parent | dfa1c31564404284d4faa694c157192cd64cf6a4 (diff) | |
download | linux-f9dfbebb8b39b692474a30e9430073577dd88d7c.tar.xz |
USB: serial: digi_acceleport.c: remove dbg() usage
dbg() was a very old USB-serial-specific macro.
This patch removes it from being used in the
driver and uses dev_dbg() instead.
CC: Peter Berger <pberger@brimson.com>
CC: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/digi_acceleport.c')
-rw-r--r-- | drivers/usb/serial/digi_acceleport.c | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index b5cd838..df60a33 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -404,14 +404,15 @@ static void digi_wakeup_write(struct usb_serial_port *port) static int digi_write_oob_command(struct usb_serial_port *port, unsigned char *buf, int count, int interruptible) { - int ret = 0; int len; struct usb_serial_port *oob_port = (struct usb_serial_port *)((struct digi_serial *)(usb_get_serial_data(port->serial)))->ds_oob_port; struct digi_port *oob_priv = usb_get_serial_port_data(oob_port); unsigned long flags = 0; - dbg("digi_write_oob_command: TOP: port=%d, count=%d", oob_priv->dp_port_num, count); + dev_dbg(&port->dev, + "digi_write_oob_command: TOP: port=%d, count=%d\n", + oob_priv->dp_port_num, count); spin_lock_irqsave(&oob_priv->dp_port_lock, flags); while (count > 0) { @@ -467,7 +468,7 @@ static int digi_write_inb_command(struct usb_serial_port *port, unsigned char *data = port->write_urb->transfer_buffer; unsigned long flags = 0; - dbg("digi_write_inb_command: TOP: port=%d, count=%d", + dev_dbg(&port->dev, "digi_write_inb_command: TOP: port=%d, count=%d\n", priv->dp_port_num, count); if (timeout) @@ -549,7 +550,8 @@ static int digi_set_modem_signals(struct usb_serial_port *port, unsigned long flags = 0; - dbg("digi_set_modem_signals: TOP: port=%d, modem_signals=0x%x", + dev_dbg(&port->dev, + "digi_set_modem_signals: TOP: port=%d, modem_signals=0x%x\n", port_priv->dp_port_num, modem_signals); spin_lock_irqsave(&oob_priv->dp_port_lock, flags); @@ -687,6 +689,7 @@ static void digi_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old_termios) { struct digi_port *priv = usb_get_serial_port_data(port); + struct device *dev = &port->dev; unsigned int iflag = tty->termios->c_iflag; unsigned int cflag = tty->termios->c_cflag; unsigned int old_iflag = old_termios->c_iflag; @@ -697,7 +700,9 @@ static void digi_set_termios(struct tty_struct *tty, int i = 0; speed_t baud; - dbg("digi_set_termios: TOP: port=%d, iflag=0x%x, old_iflag=0x%x, cflag=0x%x, old_cflag=0x%x", priv->dp_port_num, iflag, old_iflag, cflag, old_cflag); + dev_dbg(dev, + "digi_set_termios: TOP: port=%d, iflag=0x%x, old_iflag=0x%x, cflag=0x%x, old_cflag=0x%x\n", + priv->dp_port_num, iflag, old_iflag, cflag, old_cflag); /* set baud rate */ baud = tty_get_baud_rate(tty); @@ -773,7 +778,8 @@ static void digi_set_termios(struct tty_struct *tty, case CS7: arg = DIGI_WORD_SIZE_7; break; case CS8: arg = DIGI_WORD_SIZE_8; break; default: - dbg("digi_set_termios: can't handle word size %d", + dev_dbg(dev, + "digi_set_termios: can't handle word size %d\n", (cflag&CSIZE)); break; } @@ -866,7 +872,7 @@ static void digi_set_termios(struct tty_struct *tty, } ret = digi_write_oob_command(port, buf, i, 1); if (ret != 0) - dbg("digi_set_termios: write oob failed, ret=%d", ret); + dev_dbg(dev, "digi_set_termios: write oob failed, ret=%d\n", ret); tty_encode_baud_rate(tty, baud, baud); } @@ -922,7 +928,8 @@ static int digi_write(struct tty_struct *tty, struct usb_serial_port *port, unsigned char *data = port->write_urb->transfer_buffer; unsigned long flags = 0; - dbg("digi_write: TOP: port=%d, count=%d, in_interrupt=%ld", + dev_dbg(&port->dev, + "digi_write: TOP: port=%d, count=%d, in_interrupt=%ld\n", priv->dp_port_num, count, in_interrupt()); /* copy user data (which can sleep) before getting spin lock */ @@ -981,7 +988,7 @@ static int digi_write(struct tty_struct *tty, struct usb_serial_port *port, dev_err_console(port, "%s: usb_submit_urb failed, ret=%d, port=%d\n", __func__, ret, priv->dp_port_num); - dbg("digi_write: returning %d", ret); + dev_dbg(&port->dev, "digi_write: returning %d\n", ret); return ret; } @@ -1012,7 +1019,7 @@ static void digi_write_bulk_callback(struct urb *urb) /* handle oob callback */ if (priv->dp_port_num == serial_priv->ds_oob_port_num) { - dbg("digi_write_bulk_callback: oob callback"); + dev_dbg(&port->dev, "digi_write_bulk_callback: oob callback\n"); spin_lock(&priv->dp_port_lock); priv->dp_write_urb_in_use = 0; wake_up_interruptible(&port->write_wait); @@ -1066,7 +1073,7 @@ static int digi_write_room(struct tty_struct *tty) room = port->bulk_out_size - 2 - priv->dp_out_buf_len; spin_unlock_irqrestore(&priv->dp_port_lock, flags); - dbg("digi_write_room: port=%d, room=%d", priv->dp_port_num, room); + dev_dbg(&port->dev, "digi_write_room: port=%d, room=%d\n", priv->dp_port_num, room); return room; } @@ -1077,12 +1084,12 @@ static int digi_chars_in_buffer(struct tty_struct *tty) struct digi_port *priv = usb_get_serial_port_data(port); if (priv->dp_write_urb_in_use) { - dbg("digi_chars_in_buffer: port=%d, chars=%d", + dev_dbg(&port->dev, "digi_chars_in_buffer: port=%d, chars=%d\n", priv->dp_port_num, port->bulk_out_size - 2); /* return(port->bulk_out_size - 2); */ return 256; } else { - dbg("digi_chars_in_buffer: port=%d, chars=%d", + dev_dbg(&port->dev, "digi_chars_in_buffer: port=%d, chars=%d\n", priv->dp_port_num, priv->dp_out_buf_len); return priv->dp_out_buf_len; } @@ -1120,7 +1127,7 @@ static int digi_open(struct tty_struct *tty, struct usb_serial_port *port) ret = digi_write_oob_command(port, buf, 8, 1); if (ret != 0) - dbg("digi_open: write oob failed, ret=%d", ret); + dev_dbg(&port->dev, "digi_open: write oob failed, ret=%d\n", ret); /* set termios settings */ if (tty) { @@ -1180,7 +1187,7 @@ static void digi_close(struct usb_serial_port *port) ret = digi_write_oob_command(port, buf, 20, 0); if (ret != 0) - dbg("digi_close: write oob failed, ret=%d", ret); + dev_dbg(&port->dev, "digi_close: write oob failed, ret=%d\n", ret); /* wait for final commands on oob port to complete */ prepare_to_wait(&priv->dp_flush_wait, &wait, @@ -1448,9 +1455,9 @@ static int digi_read_inb_callback(struct urb *urb) tty_kref_put(tty); if (opcode == DIGI_CMD_RECEIVE_DISABLE) - dbg("%s: got RECEIVE_DISABLE", __func__); + dev_dbg(&port->dev, "%s: got RECEIVE_DISABLE\n", __func__); else if (opcode != DIGI_CMD_RECEIVE_DATA) - dbg("%s: unknown opcode: %d", __func__, opcode); + dev_dbg(&port->dev, "%s: unknown opcode: %d\n", __func__, opcode); return throttled ? 1 : 0; @@ -1484,7 +1491,7 @@ static int digi_read_oob_callback(struct urb *urb) status = ((unsigned char *)urb->transfer_buffer)[i++]; val = ((unsigned char *)urb->transfer_buffer)[i++]; - dbg("digi_read_oob_callback: opcode=%d, line=%d, status=%d, val=%d", + dev_dbg(&port->dev, "digi_read_oob_callback: opcode=%d, line=%d, status=%d, val=%d\n", opcode, line, status, val); if (status != 0 || line >= serial->type->num_ports) |