aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2009-10-07 14:05:05 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-10-09 16:52:05 -0400
commit63b0061246b54b849da8f189ae048e8110d8ce7d (patch)
tree320ca2576aada4126afb2219337ab86deff475a7 /drivers/usb
parent0cbd81a9f6bac734ac3266687bf027af1e395270 (diff)
USB: ftdi_sio: remove unused rx_byte counter
Remove unused rx_byte counter which is never exposed as noted by Alan Cox. Signed-off-by: Johan Hovold <jhovold@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/ftdi_sio.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 0ac2c2f540c9..bfb23d64bc6a 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -81,7 +81,6 @@ struct ftdi_private {
81 struct delayed_work rx_work; 81 struct delayed_work rx_work;
82 struct usb_serial_port *port; 82 struct usb_serial_port *port;
83 int rx_processed; 83 int rx_processed;
84 unsigned long rx_bytes;
85 84
86 __u16 interface; /* FT2232C, FT2232H or FT4232H port interface 85 __u16 interface; /* FT2232C, FT2232H or FT4232H port interface
87 (0 for FT232/245) */ 86 (0 for FT232/245) */
@@ -1699,9 +1698,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
1699 spin_lock_irqsave(&priv->tx_lock, flags); 1698 spin_lock_irqsave(&priv->tx_lock, flags);
1700 priv->tx_bytes = 0; 1699 priv->tx_bytes = 0;
1701 spin_unlock_irqrestore(&priv->tx_lock, flags); 1700 spin_unlock_irqrestore(&priv->tx_lock, flags);
1702 spin_lock_irqsave(&priv->rx_lock, flags);
1703 priv->rx_bytes = 0;
1704 spin_unlock_irqrestore(&priv->rx_lock, flags);
1705 1701
1706 write_latency_timer(port); 1702 write_latency_timer(port);
1707 1703
@@ -2014,8 +2010,6 @@ static void ftdi_read_bulk_callback(struct urb *urb)
2014 struct usb_serial_port *port = urb->context; 2010 struct usb_serial_port *port = urb->context;
2015 struct tty_struct *tty; 2011 struct tty_struct *tty;
2016 struct ftdi_private *priv; 2012 struct ftdi_private *priv;
2017 unsigned long countread;
2018 unsigned long flags;
2019 int status = urb->status; 2013 int status = urb->status;
2020 2014
2021 if (urb->number_of_packets > 0) { 2015 if (urb->number_of_packets > 0) {
@@ -2054,13 +2048,6 @@ static void ftdi_read_bulk_callback(struct urb *urb)
2054 goto out; 2048 goto out;
2055 } 2049 }
2056 2050
2057 /* count data bytes, but not status bytes */
2058 countread = urb->actual_length;
2059 countread -= 2 * DIV_ROUND_UP(countread, priv->max_packet_size);
2060 spin_lock_irqsave(&priv->rx_lock, flags);
2061 priv->rx_bytes += countread;
2062 spin_unlock_irqrestore(&priv->rx_lock, flags);
2063
2064 ftdi_process_read(&priv->rx_work.work); 2051 ftdi_process_read(&priv->rx_work.work);
2065out: 2052out:
2066 tty_kref_put(tty); 2053 tty_kref_put(tty);