diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2010-02-17 15:05:47 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 22:55:12 (GMT) |
commit | 1f87158e44e79e62c8250f278c225ce4ab695f4b (patch) | |
tree | eff328f63a75993a3e1ffbba9c9f0ba1fecf0edb /drivers/usb/serial/spcp8x5.c | |
parent | a108bfcb372d8c4452701039308fb95747911c59 (diff) | |
download | linux-1f87158e44e79e62c8250f278c225ce4ab695f4b.tar.xz |
USB: remove references to port->port.count from the serial drivers
This patch (as1344) removes references to port->port.count from the
USB serial drivers. Now that serial ports are properly reference
counted, port.count checking is unnecessary and incorrect. Drivers
should assume that the port is in use from the time the open method
runs until the close method is called.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/spcp8x5.c')
-rw-r--r-- | drivers/usb/serial/spcp8x5.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index cf508e2..5d39191 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c @@ -686,8 +686,6 @@ static void spcp8x5_read_bulk_callback(struct urb *urb) /* check the urb status */ if (result) { - if (!port->port.count) - return; if (result == -EPROTO) { /* spcp8x5 mysteriously fails with -EPROTO */ /* reschedule the read */ @@ -734,16 +732,11 @@ static void spcp8x5_read_bulk_callback(struct urb *urb) } tty_kref_put(tty); - /* Schedule the next read _if_ we are still open */ - if (port->port.count) { - urb->dev = port->serial->dev; - result = usb_submit_urb(urb , GFP_ATOMIC); - if (result) - dev_dbg(&port->dev, "failed submitting read urb %d\n", - result); - } - - return; + /* Schedule the next read */ + urb->dev = port->serial->dev; + result = usb_submit_urb(urb , GFP_ATOMIC); + if (result) + dev_dbg(&port->dev, "failed submitting read urb %d\n", result); } /* get data from ring buffer and then write to usb bus */ |