diff options
author | Johan Hovold <jhovold@gmail.com> | 2009-10-07 20:05:05 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-22 15:11:47 -0700 |
commit | f604f3b1271d5eea4e9edd067d93063f99b628b2 (patch) | |
tree | d3b76f191476b333f824afcb38196e9c34d9e403 | |
parent | bd67850fbc2e4bf38d6af8b0a9d271f333652778 (diff) |
USB: ftdi_sio: remove unused rx_byte counter
commit 63b0061246b54b849da8f189ae048e8110d8ce7d upstream.
Remove unused rx_byte counter which is never exposed as noted by Alan
Cox.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index f8187a18f744..107ea618e62f 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -81,7 +81,6 @@ struct ftdi_private { struct delayed_work rx_work; struct usb_serial_port *port; int rx_processed; - unsigned long rx_bytes; __u16 interface; /* FT2232C, FT2232H or FT4232H port interface (0 for FT232/245) */ @@ -1701,9 +1700,6 @@ static int ftdi_open(struct tty_struct *tty, spin_lock_irqsave(&priv->tx_lock, flags); priv->tx_bytes = 0; spin_unlock_irqrestore(&priv->tx_lock, flags); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes = 0; - spin_unlock_irqrestore(&priv->rx_lock, flags); write_latency_timer(port); @@ -2016,8 +2012,6 @@ static void ftdi_read_bulk_callback(struct urb *urb) struct usb_serial_port *port = urb->context; struct tty_struct *tty; struct ftdi_private *priv; - unsigned long countread; - unsigned long flags; int status = urb->status; if (urb->number_of_packets > 0) { @@ -2056,13 +2050,6 @@ static void ftdi_read_bulk_callback(struct urb *urb) goto out; } - /* count data bytes, but not status bytes */ - countread = urb->actual_length; - countread -= 2 * DIV_ROUND_UP(countread, priv->max_packet_size); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes += countread; - spin_unlock_irqrestore(&priv->rx_lock, flags); - ftdi_process_read(&priv->rx_work.work); out: tty_kref_put(tty); |