Commit 59d33f2f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: serial: remove debug parameter from usb_serial_debug_data()

We should use dev_dbg() for usb_serial_debug_data() like all of the rest
of the usb-serial drivers use, so remove the debug parameter as it's not
needed.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 82760526
...@@ -650,8 +650,7 @@ static void ark3116_read_int_callback(struct urb *urb) ...@@ -650,8 +650,7 @@ static void ark3116_read_int_callback(struct urb *urb)
/* /*
* Not sure what this data meant... * Not sure what this data meant...
*/ */
usb_serial_debug_data(debug, &port->dev, usb_serial_debug_data(&port->dev, __func__,
__func__,
urb->actual_length, urb->actual_length,
urb->transfer_buffer); urb->transfer_buffer);
break; break;
......
...@@ -206,8 +206,7 @@ static void belkin_sa_read_int_callback(struct urb *urb) ...@@ -206,8 +206,7 @@ static void belkin_sa_read_int_callback(struct urb *urb)
goto exit; goto exit;
} }
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
urb->actual_length, data);
/* Handle known interrupt data */ /* Handle known interrupt data */
/* ignore data[0] and data[1] */ /* ignore data[0] and data[1] */
......
...@@ -463,7 +463,7 @@ static void ch341_read_int_callback(struct urb *urb) ...@@ -463,7 +463,7 @@ static void ch341_read_int_callback(struct urb *urb)
goto exit; goto exit;
} }
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__,
urb->actual_length, urb->transfer_buffer); urb->actual_length, urb->transfer_buffer);
if (actual_length >= 4) { if (actual_length >= 4) {
......
...@@ -222,8 +222,7 @@ static int cyberjack_write(struct tty_struct *tty, ...@@ -222,8 +222,7 @@ static int cyberjack_write(struct tty_struct *tty,
/* Copy data */ /* Copy data */
memcpy(priv->wrbuf + priv->wrfilled, buf, count); memcpy(priv->wrbuf + priv->wrfilled, buf, count);
usb_serial_debug_data(debug, dev, __func__, count, usb_serial_debug_data(dev, __func__, count, priv->wrbuf + priv->wrfilled);
priv->wrbuf + priv->wrfilled);
priv->wrfilled += count; priv->wrfilled += count;
if (priv->wrfilled >= 3) { if (priv->wrfilled >= 3) {
...@@ -295,7 +294,7 @@ static void cyberjack_read_int_callback(struct urb *urb) ...@@ -295,7 +294,7 @@ static void cyberjack_read_int_callback(struct urb *urb)
if (status) if (status)
return; return;
usb_serial_debug_data(debug, dev, __func__, urb->actual_length, data); usb_serial_debug_data(dev, __func__, urb->actual_length, data);
/* React only to interrupts signaling a bulk_in transfer */ /* React only to interrupts signaling a bulk_in transfer */
if (urb->actual_length == 4 && data[0] == 0x01) { if (urb->actual_length == 4 && data[0] == 0x01) {
...@@ -348,8 +347,7 @@ static void cyberjack_read_bulk_callback(struct urb *urb) ...@@ -348,8 +347,7 @@ static void cyberjack_read_bulk_callback(struct urb *urb)
int result; int result;
int status = urb->status; int status = urb->status;
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(dev, __func__, urb->actual_length, data);
urb->actual_length, data);
if (status) { if (status) {
dev_dbg(dev, "%s - nonzero read bulk status received: %d\n", dev_dbg(dev, "%s - nonzero read bulk status received: %d\n",
__func__, status); __func__, status);
......
...@@ -769,9 +769,8 @@ static void cypress_send(struct usb_serial_port *port) ...@@ -769,9 +769,8 @@ static void cypress_send(struct usb_serial_port *port)
actual_size = count + actual_size = count +
(priv->pkt_fmt == packet_format_1 ? 2 : 1); (priv->pkt_fmt == packet_format_1 ? 2 : 1);
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(dev, __func__, port->interrupt_out_size,
port->interrupt_out_size, port->interrupt_out_urb->transfer_buffer);
port->interrupt_out_urb->transfer_buffer);
usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev, usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev,
usb_sndintpipe(port->serial->dev, port->interrupt_out_endpointAddress), usb_sndintpipe(port->serial->dev, port->interrupt_out_endpointAddress),
...@@ -1187,8 +1186,7 @@ static void cypress_read_int_callback(struct urb *urb) ...@@ -1187,8 +1186,7 @@ static void cypress_read_int_callback(struct urb *urb)
goto continue_read; goto continue_read;
} }
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
urb->actual_length, data);
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
/* check to see if status has changed */ /* check to see if status has changed */
......
...@@ -85,7 +85,7 @@ static void f81232_read_int_callback(struct urb *urb) ...@@ -85,7 +85,7 @@ static void f81232_read_int_callback(struct urb *urb)
goto exit; goto exit;
} }
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__,
urb->actual_length, urb->transfer_buffer); urb->actual_length, urb->transfer_buffer);
f81232_update_line_status(port, data, actual_length); f81232_update_line_status(port, data, actual_length);
......
...@@ -258,10 +258,7 @@ static void send_to_tty(struct usb_serial_port *port, ...@@ -258,10 +258,7 @@ static void send_to_tty(struct usb_serial_port *port,
struct tty_struct *tty = tty_port_tty_get(&port->port); struct tty_struct *tty = tty_port_tty_get(&port->port);
if (tty && actual_length) { if (tty && actual_length) {
usb_serial_debug_data(&port->dev, __func__, actual_length, data);
usb_serial_debug_data(debug, &port->dev,
__func__, actual_length, data);
tty_insert_flip_string(tty, data, actual_length); tty_insert_flip_string(tty, data, actual_length);
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
} }
...@@ -410,8 +407,8 @@ static int gsp_rec_packet(struct garmin_data *garmin_data_p, int count) ...@@ -410,8 +407,8 @@ static int gsp_rec_packet(struct garmin_data *garmin_data_p, int count)
int pktid = recpkt[0]; int pktid = recpkt[0];
int size = recpkt[1]; int size = recpkt[1];
usb_serial_debug_data(debug, &garmin_data_p->port->dev, usb_serial_debug_data(&garmin_data_p->port->dev, __func__,
__func__, count-GSP_INITIAL_OFFSET, recpkt); count-GSP_INITIAL_OFFSET, recpkt);
if (size != (count-GSP_INITIAL_OFFSET-3)) { if (size != (count-GSP_INITIAL_OFFSET-3)) {
dev_dbg(dev, "%s - invalid size, expected %d bytes, got %d\n", dev_dbg(dev, "%s - invalid size, expected %d bytes, got %d\n",
...@@ -642,8 +639,8 @@ static int gsp_send(struct garmin_data *garmin_data_p, ...@@ -642,8 +639,8 @@ static int gsp_send(struct garmin_data *garmin_data_p,
/* garmin_data_p->outbuffer now contains a complete packet */ /* garmin_data_p->outbuffer now contains a complete packet */
usb_serial_debug_data(debug, &garmin_data_p->port->dev, usb_serial_debug_data(&garmin_data_p->port->dev, __func__, k,
__func__, k, garmin_data_p->outbuffer); garmin_data_p->outbuffer);
garmin_data_p->outsize = 0; garmin_data_p->outsize = 0;
...@@ -1038,7 +1035,7 @@ static int garmin_write_bulk(struct usb_serial_port *port, ...@@ -1038,7 +1035,7 @@ static int garmin_write_bulk(struct usb_serial_port *port,
memcpy(buffer, buf, count); memcpy(buffer, buf, count);
usb_serial_debug_data(debug, &port->dev, __func__, count, buffer); usb_serial_debug_data(&port->dev, __func__, count, buffer);
usb_fill_bulk_urb(urb, serial->dev, usb_fill_bulk_urb(urb, serial->dev,
usb_sndbulkpipe(serial->dev, usb_sndbulkpipe(serial->dev,
...@@ -1084,7 +1081,7 @@ static int garmin_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -1084,7 +1081,7 @@ static int garmin_write(struct tty_struct *tty, struct usb_serial_port *port,
struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); struct garmin_data *garmin_data_p = usb_get_serial_port_data(port);
__le32 *privpkt = (__le32 *)garmin_data_p->privpkt; __le32 *privpkt = (__le32 *)garmin_data_p->privpkt;
usb_serial_debug_data(debug, dev, __func__, count, buf); usb_serial_debug_data(dev, __func__, count, buf);
if (garmin_data_p->state == STATE_RESET) if (garmin_data_p->state == STATE_RESET)
return -EIO; return -EIO;
...@@ -1225,8 +1222,7 @@ static void garmin_read_bulk_callback(struct urb *urb) ...@@ -1225,8 +1222,7 @@ static void garmin_read_bulk_callback(struct urb *urb)
return; return;
} }
usb_serial_debug_data(debug, &port->dev, usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
__func__, urb->actual_length, data);
garmin_read_process(garmin_data_p, data, urb->actual_length, 1); garmin_read_process(garmin_data_p, data, urb->actual_length, 1);
...@@ -1284,8 +1280,8 @@ static void garmin_read_int_callback(struct urb *urb) ...@@ -1284,8 +1280,8 @@ static void garmin_read_int_callback(struct urb *urb)
return; return;
} }
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__, urb->actual_length,
urb->actual_length, urb->transfer_buffer); urb->transfer_buffer);
if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) && if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) &&
0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY, 0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY,
......
...@@ -171,8 +171,7 @@ static int usb_serial_generic_write_start(struct usb_serial_port *port) ...@@ -171,8 +171,7 @@ static int usb_serial_generic_write_start(struct usb_serial_port *port)
urb->transfer_buffer, urb->transfer_buffer,
port->bulk_out_size); port->bulk_out_size);
urb->transfer_buffer_length = count; urb->transfer_buffer_length = count;
usb_serial_debug_data(debug, &port->dev, __func__, count, usb_serial_debug_data(&port->dev, __func__, count, urb->transfer_buffer);
urb->transfer_buffer);
spin_lock_irqsave(&port->lock, flags); spin_lock_irqsave(&port->lock, flags);
port->tx_bytes += count; port->tx_bytes += count;
spin_unlock_irqrestore(&port->lock, flags); spin_unlock_irqrestore(&port->lock, flags);
...@@ -365,8 +364,7 @@ void usb_serial_generic_read_bulk_callback(struct urb *urb) ...@@ -365,8 +364,7 @@ void usb_serial_generic_read_bulk_callback(struct urb *urb)
return; return;
} }
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
urb->actual_length, data);
port->serial->type->process_read_urb(urb); port->serial->type->process_read_urb(urb);
/* Throttle the device if requested by tty */ /* Throttle the device if requested by tty */
......
...@@ -599,7 +599,7 @@ static void edge_interrupt_callback(struct urb *urb) ...@@ -599,7 +599,7 @@ static void edge_interrupt_callback(struct urb *urb)
/* process this interrupt-read even if there are no ports open */ /* process this interrupt-read even if there are no ports open */
if (length) { if (length) {
usb_serial_debug_data(debug, dev, __func__, length, data); usb_serial_debug_data(dev, __func__, length, data);
if (length > 1) { if (length > 1) {
bytes_avail = data[0] | (data[1] << 8); bytes_avail = data[0] | (data[1] << 8);
...@@ -705,7 +705,7 @@ static void edge_bulk_in_callback(struct urb *urb) ...@@ -705,7 +705,7 @@ static void edge_bulk_in_callback(struct urb *urb)
dev = &edge_serial->serial->dev->dev; dev = &edge_serial->serial->dev->dev;
raw_data_length = urb->actual_length; raw_data_length = urb->actual_length;
usb_serial_debug_data(debug, dev, __func__, raw_data_length, data); usb_serial_debug_data(dev, __func__, raw_data_length, data);
spin_lock(&edge_serial->es_lock); spin_lock(&edge_serial->es_lock);
...@@ -1178,8 +1178,7 @@ static int edge_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -1178,8 +1178,7 @@ static int edge_write(struct tty_struct *tty, struct usb_serial_port *port,
/* now copy our data */ /* now copy our data */
memcpy(&fifo->fifo[fifo->head], data, firsthalf); memcpy(&fifo->fifo[fifo->head], data, firsthalf);
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__, firsthalf, &fifo->fifo[fifo->head]);
firsthalf, &fifo->fifo[fifo->head]);
/* update the index and size */ /* update the index and size */
fifo->head += firsthalf; fifo->head += firsthalf;
...@@ -1194,8 +1193,7 @@ static int edge_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -1194,8 +1193,7 @@ static int edge_write(struct tty_struct *tty, struct usb_serial_port *port,
if (secondhalf) { if (secondhalf) {
dev_dbg(&port->dev, "%s - copy rest of data %d\n", __func__, secondhalf); dev_dbg(&port->dev, "%s - copy rest of data %d\n", __func__, secondhalf);
memcpy(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf); memcpy(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf);
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__, secondhalf, &fifo->fifo[fifo->head]);
secondhalf, &fifo->fifo[fifo->head]);
/* update the index and size */ /* update the index and size */
fifo->count += secondhalf; fifo->count += secondhalf;
fifo->head += secondhalf; fifo->head += secondhalf;
...@@ -1312,8 +1310,7 @@ static void send_more_port_data(struct edgeport_serial *edge_serial, ...@@ -1312,8 +1310,7 @@ static void send_more_port_data(struct edgeport_serial *edge_serial,
} }
if (count) if (count)
usb_serial_debug_data(debug, &edge_port->port->dev, usb_serial_debug_data(&edge_port->port->dev, __func__, count, &buffer[2]);
__func__, count, &buffer[2]);
/* fill up the urb with all of our data and submit it */ /* fill up the urb with all of our data and submit it */
usb_fill_bulk_urb(urb, edge_serial->serial->dev, usb_fill_bulk_urb(urb, edge_serial->serial->dev,
...@@ -2305,7 +2302,7 @@ static int write_cmd_usb(struct edgeport_port *edge_port, ...@@ -2305,7 +2302,7 @@ static int write_cmd_usb(struct edgeport_port *edge_port,
int status = 0; int status = 0;
struct urb *urb; struct urb *urb;
usb_serial_debug_data(debug, dev, __func__, length, buffer); usb_serial_debug_data(dev, __func__, length, buffer);
/* Allocate our next urb */ /* Allocate our next urb */
urb = usb_alloc_urb(0, GFP_ATOMIC); urb = usb_alloc_urb(0, GFP_ATOMIC);
......
...@@ -321,8 +321,7 @@ static int read_download_mem(struct usb_device *dev, int start_address, ...@@ -321,8 +321,7 @@ static int read_download_mem(struct usb_device *dev, int start_address,
} }
if (read_length > 1) if (read_length > 1)
usb_serial_debug_data(debug, &dev->dev, __func__, usb_serial_debug_data(&dev->dev, __func__, read_length, buffer);
read_length, buffer);
/* Update pointers/length */ /* Update pointers/length */
start_address += read_length; start_address += read_length;
...@@ -359,8 +358,7 @@ static int read_boot_mem(struct edgeport_serial *serial, ...@@ -359,8 +358,7 @@ static int read_boot_mem(struct edgeport_serial *serial,
dev_dbg(&serial->serial->dev->dev, "%s - start_address = %x, length = %d\n", dev_dbg(&serial->serial->dev->dev, "%s - start_address = %x, length = %d\n",
__func__, start_address, length); __func__, start_address, length);
usb_serial_debug_data(debug, &serial->serial->dev->dev, usb_serial_debug_data(&serial->serial->dev->dev, __func__, length, buffer);
__func__, length, buffer);
serial->TiReadI2C = 1; serial->TiReadI2C = 1;
...@@ -398,8 +396,7 @@ static int write_boot_mem(struct edgeport_serial *serial, ...@@ -398,8 +396,7 @@ static int write_boot_mem(struct edgeport_serial *serial,
} }
dev_dbg(&serial->serial->dev->dev, "%s - start_sddr = %x, length = %d\n", __func__, start_address, length); dev_dbg(&serial->serial->dev->dev, "%s - start_sddr = %x, length = %d\n", __func__, start_address, length);
usb_serial_debug_data(debug, &serial->serial->dev->dev, usb_serial_debug_data(&serial->serial->dev->dev, __func__, length, buffer);
__func__, length, buffer);
return status; return status;
} }
...@@ -425,7 +422,7 @@ static int write_i2c_mem(struct edgeport_serial *serial, ...@@ -425,7 +422,7 @@ static int write_i2c_mem(struct edgeport_serial *serial,
dev_dbg(dev, "%s - BytesInFirstPage Addr = %x, length = %d\n", dev_dbg(dev, "%s - BytesInFirstPage Addr = %x, length = %d\n",
__func__, start_address, write_length); __func__, start_address, write_length);
usb_serial_debug_data(debug, dev, __func__, write_length, buffer); usb_serial_debug_data(dev, __func__, write_length, buffer);
/* Write first page */ /* Write first page */
be_start_address = cpu_to_be16(start_address); be_start_address = cpu_to_be16(start_address);
...@@ -452,7 +449,7 @@ static int write_i2c_mem(struct edgeport_serial *serial, ...@@ -452,7 +449,7 @@ static int write_i2c_mem(struct edgeport_serial *serial,
dev_dbg(dev, "%s - Page Write Addr = %x, length = %d\n", dev_dbg(dev, "%s - Page Write Addr = %x, length = %d\n",
__func__, start_address, write_length); __func__, start_address, write_length);
usb_serial_debug_data(debug, dev, __func__, write_length, buffer); usb_serial_debug_data(dev, __func__, write_length, buffer);
/* Write next page */ /* Write next page */
be_start_address = cpu_to_be16(start_address); be_start_address = cpu_to_be16(start_address);
...@@ -1622,7 +1619,7 @@ static void edge_interrupt_callback(struct urb *urb) ...@@ -1622,7 +1619,7 @@ static void edge_interrupt_callback(struct urb *urb)
} }
dev = &edge_serial->serial->dev->dev; dev = &edge_serial->serial->dev->dev;
usb_serial_debug_data(debug, dev, __func__, length, data); usb_serial_debug_data(dev, __func__, length, data);
if (length != 2) { if (length != 2) {
dev_dbg(dev, "%s - expecting packet of size 2, got %d\n", __func__, length); dev_dbg(dev, "%s - expecting packet of size 2, got %d\n", __func__, length);
...@@ -1726,7 +1723,7 @@ static void edge_bulk_in_callback(struct urb *urb) ...@@ -1726,7 +1723,7 @@ static void edge_bulk_in_callback(struct urb *urb)
tty = tty_port_tty_get(&edge_port->port->port); tty = tty_port_tty_get(&edge_port->port->port);
if (tty && urb->actual_length) { if (tty && urb->actual_length) {
usb_serial_debug_data(debug, dev, __func__, urb->actual_length, data); usb_serial_debug_data(dev, __func__, urb->actual_length, data);
if (edge_port->close_pending) if (edge_port->close_pending)
dev_dbg(dev, "%s - close pending, dropping data on the floor\n", dev_dbg(dev, "%s - close pending, dropping data on the floor\n",
__func__); __func__);
...@@ -2059,8 +2056,7 @@ static void edge_send(struct tty_struct *tty) ...@@ -2059,8 +2056,7 @@ static void edge_send(struct tty_struct *tty)
spin_unlock_irqrestore(&edge_port->ep_lock, flags); spin_unlock_irqrestore(&edge_port->ep_lock, flags);
usb_serial_debug_data(debug, &port->dev, __func__, count, usb_serial_debug_data(&port->dev, __func__, count, port->write_urb->transfer_buffer);
port->write_urb->transfer_buffer);
/* set up our urb */ /* set up our urb */
port->write_urb->transfer_buffer_length = count; port->write_urb->transfer_buffer_length = count;
......
...@@ -392,8 +392,7 @@ static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -392,8 +392,7 @@ static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port,
/* Copy data to buffer */ /* Copy data to buffer */
memcpy(priv->buf + priv->filled, buf, count); memcpy(priv->buf + priv->filled, buf, count);
usb_serial_debug_data(debug, &port->dev, __func__, count, usb_serial_debug_data(&port->dev, __func__, count, priv->buf + priv->filled);
priv->buf + priv->filled);
priv->filled = priv->filled + count; priv->filled = priv->filled + count;
/* only send complete block. TWIN, KAAN SIM and adapter K /* only send complete block. TWIN, KAAN SIM and adapter K
......
...@@ -553,8 +553,7 @@ static void mct_u232_read_int_callback(struct urb *urb) ...@@ -553,8 +553,7 @@ static void mct_u232_read_int_callback(struct urb *urb)
goto exit; goto exit;
} }
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
urb->actual_length, data);
/* /*
* Work-a-round: handle the 'usual' bulk-in pipe here * Work-a-round: handle the 'usual' bulk-in pipe here
......
...@@ -1266,7 +1266,7 @@ static int mos7720_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -1266,7 +1266,7 @@ static int mos7720_write(struct tty_struct *tty, struct usb_serial_port *port,
transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE); transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE);
memcpy(urb->transfer_buffer, current_position, transfer_size); memcpy(urb->transfer_buffer, current_position, transfer_size);
usb_serial_debug_data(debug, &port->dev, __func__, transfer_size, usb_serial_debug_data(&port->dev, __func__, transfer_size,
urb->transfer_buffer); urb->transfer_buffer);
/* fill urb with data and submit */ /* fill urb with data and submit */
......
...@@ -796,7 +796,7 @@ static void mos7840_bulk_in_callback(struct urb *urb) ...@@ -796,7 +796,7 @@ static void mos7840_bulk_in_callback(struct urb *urb)
} }
data = urb->transfer_buffer; data = urb->transfer_buffer;
usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data); usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
if (urb->actual_length) { if (urb->actual_length) {
tty = tty_port_tty_get(&mos7840_port->port->port); tty = tty_port_tty_get(&mos7840_port->port->port);
......
...@@ -55,8 +55,7 @@ static void navman_read_int_callback(struct urb *urb) ...@@ -55,8 +55,7 @@ static void navman_read_int_callback(struct urb *urb)
goto exit; goto exit;
} }
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
urb->actual_length, data);
tty = tty_port_tty_get(&port->port); tty = tty_port_tty_get(&port->port);
if (tty && urb->actual_length) { if (tty && urb->actual_length) {
......
...@@ -228,8 +228,8 @@ static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -228,8 +228,8 @@ static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port,
memcpy(wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, memcpy(wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET,
buf, count); buf, count);
usb_serial_debug_data(debug, &port->dev, __func__, count, usb_serial_debug_data(&port->dev, __func__, count,
wport->write_urb->transfer_buffer); wport->write_urb->transfer_buffer);
header->oh_seq = od->od_outseq++; header->oh_seq = od->od_outseq++;
header->oh_len = count; header->oh_len = count;
......
...@@ -87,8 +87,7 @@ static void opticon_read_bulk_callback(struct urb *urb) ...@@ -87,8 +87,7 @@ static void opticon_read_bulk_callback(struct urb *urb)
goto exit; goto exit;
} }
usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
data);
if (urb->actual_length > 2) { if (urb->actual_length > 2) {
data_length = urb->actual_length - 2; data_length = urb->actual_length - 2;
...@@ -276,7 +275,7 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -276,7 +275,7 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
memcpy(buffer, buf, count); memcpy(buffer, buf, count);
usb_serial_debug_data(debug, &port->dev, __func__, count, buffer); usb_serial_debug_data(&port->dev, __func__, count, buffer);
/* The conncected devices do not have a bulk write endpoint, /* The conncected devices do not have a bulk write endpoint,
* to transmit data to de barcode device the control endpoint is used */ * to transmit data to de barcode device the control endpoint is used */
......
...@@ -741,7 +741,7 @@ static void pl2303_read_int_callback(struct urb *urb) ...@@ -741,7 +741,7 @@ static void pl2303_read_int_callback(struct urb *urb)
goto exit; goto exit;
} }
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__,
urb->actual_length, urb->transfer_buffer); urb->actual_length, urb->transfer_buffer);
pl2303_update_line_status(port, data, actual_length); pl2303_update_line_status(port, data, actual_length);
......
...@@ -518,7 +518,7 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -518,7 +518,7 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port,
memcpy(buffer, buf, writesize); memcpy(buffer, buf, writesize);
usb_serial_debug_data(debug, &port->dev, __func__, writesize, buffer); usb_serial_debug_data(&port->dev, __func__, writesize, buffer);
usb_fill_bulk_urb(urb, serial->dev, usb_fill_bulk_urb(urb, serial->dev,
usb_sndbulkpipe(serial->dev, usb_sndbulkpipe(serial->dev,
...@@ -595,8 +595,8 @@ static void sierra_indat_callback(struct urb *urb) ...@@ -595,8 +595,8 @@ static void sierra_indat_callback(struct urb *urb)
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
tty_kref_put(tty); tty_kref_put(tty);
usb_serial_debug_data(debug, &port->dev, usb_serial_debug_data(&port->dev, __func__,
__func__, urb->actual_length, data); urb->actual_length, data);
} }
} else { } else {
dev_dbg(&port->dev, "%s: empty read urb" dev_dbg(&port->dev, "%s: empty read urb"
......
...@@ -71,8 +71,7 @@ static void symbol_int_callback(struct urb *urb) ...@@ -71,8 +71,7 @@ static void symbol_int_callback(struct urb *urb)
goto exit; goto exit;
} }
usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
data);
if (urb->actual_length > 1) { if (urb->actual_length > 1) {
data_length = urb->actual_length - 1; data_length = urb->actual_length - 1;
......
...@@ -1161,8 +1161,8 @@ static void ti_bulk_in_callback(struct urb *urb) ...@@ -1161,8 +1161,8 @@ static void ti_bulk_in_callback(struct urb *urb)
tty = tty_port_tty_get(&port->port); tty = tty_port_tty_get(&port->port);
if (tty) { if (tty) {
if (urb->actual_length) { if (urb->actual_length) {
usb_serial_debug_data(debug, dev, __func__, usb_serial_debug_data(dev, __func__, urb->actual_length,
urb->actual_length, urb->transfer_buffer); urb->transfer_buffer);
if (!tport->tp_is_open) if (!tport->tp_is_open)
dev_dbg(dev, "%s - port closed, dropping data\n", dev_dbg(dev, "%s - port closed, dropping data\n",
...@@ -1267,8 +1267,8 @@ static void ti_send(struct ti_port *tport) ...@@ -1267,8 +1267,8 @@ static void ti_send(struct ti_port *tport)
spin_unlock_irqrestore(&tport->tp_lock, flags); spin_unlock_irqrestore(&tport->tp_lock, flags);
usb_serial_debug_data(debug, &port->dev, __func__, count, usb_serial_debug_data(&port->dev, __func__, count,
port->write_urb->transfer_buffer); port->write_urb->transfer_buffer);
usb_fill_bulk_urb(port->write_urb, port->serial->dev, usb_fill_bulk_urb(port->write_urb, port->serial->dev,
usb_sndbulkpipe(port->serial->dev, usb_sndbulkpipe(port->serial->dev,
......
...@@ -310,8 +310,8 @@ static void visor_read_int_callback(struct urb *urb) ...@@ -310,8 +310,8 @@ static void visor_read_int_callback(struct urb *urb)
* Rumor has it this endpoint is used to notify when data * Rumor has it this endpoint is used to notify when data
* is ready to be read from the bulk ones. * is ready to be read from the bulk ones.
*/ */
usb_serial_debug_data(debug, &port->dev, __func__, usb_serial_debug_data(&port->dev, __func__, urb->actual_length,
urb->actual_length, urb->transfer_buffer); urb->transfer_buffer);
exit: exit:
result = usb_submit_urb(urb, GFP_ATOMIC); result = usb_submit_urb(urb, GFP_ATOMIC);
...@@ -443,8 +443,7 @@ static int palm_os_4_probe(struct usb_serial *serial, ...@@ -443,8 +443,7 @@ static int palm_os_4_probe(struct usb_serial *serial,
dev_err(dev, "%s - error %d getting connection info\n", dev_err(dev, "%s - error %d getting connection info\n",
__func__, retval); __func__, retval);
else else
usb_serial_debug_data(debug, &serial->dev->dev, __func__, usb_serial_debug_data(dev, __func__, retval, transfer_buffer);
retval, transfer_buffer);
kfree(transfer_buffer); kfree(transfer_buffer);
return 0; return 0;
......
...@@ -607,8 +607,7 @@ static void command_port_read_callback(struct urb *urb) ...@@ -607,8 +607,7 @@ static void command_port_read_callback(struct urb *urb)
return; return;
} }
usb_serial_debug_data(debug, &command_port->dev, usb_serial_debug_data(&command_port->dev, __func__, urb->actual_length, data);
__func__, urb->actual_length, data);
if (data[0] == WHITEHEAT_CMD_COMPLETE) { if (data[0] == WHITEHEAT_CMD_COMPLETE) {
command_info->command_finished = WHITEHEAT_CMD_COMPLETE; command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
......
...@@ -355,14 +355,12 @@ extern struct usb_serial_driver usb_serial_generic_device; ...@@ -355,14 +355,12 @@ extern struct usb_serial_driver usb_serial_generic_device;
extern struct bus_type usb_serial_bus_type; extern struct bus_type usb_serial_bus_type;
extern struct tty_driver *usb_serial_tty_driver; extern struct tty_driver *usb_serial_tty_driver;
static inline void usb_serial_debug_data(int debug, static inline void usb_serial_debug_data(struct device *dev,
struct device *dev,
const char *function, int size, const char *function, int size,
const unsigned char *data) const unsigned char *data)
{ {
if (debug) dev_dbg(dev, "%s - length = %d, data = %*ph\n",
dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = %*ph\n", function, size, size, data);
function, size, size, data);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment