diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2010-02-17 10:05:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:55:12 -0500 |
commit | 1f87158e44e79e62c8250f278c225ce4ab695f4b (patch) | |
tree | eff328f63a75993a3e1ffbba9c9f0ba1fecf0edb /drivers/usb/serial/cypress_m8.c | |
parent | a108bfcb372d8c4452701039308fb95747911c59 (diff) |
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/cypress_m8.c')
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 3a5d57f89dee..baf74b44e6ed 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -1321,9 +1321,9 @@ static void cypress_read_int_callback(struct urb *urb) | |||
1321 | continue_read: | 1321 | continue_read: |
1322 | tty_kref_put(tty); | 1322 | tty_kref_put(tty); |
1323 | 1323 | ||
1324 | /* Continue trying to always read... unless the port has closed. */ | 1324 | /* Continue trying to always read */ |
1325 | 1325 | ||
1326 | if (port->port.count > 0 && priv->comm_is_ok) { | 1326 | if (priv->comm_is_ok) { |
1327 | usb_fill_int_urb(port->interrupt_in_urb, port->serial->dev, | 1327 | usb_fill_int_urb(port->interrupt_in_urb, port->serial->dev, |
1328 | usb_rcvintpipe(port->serial->dev, | 1328 | usb_rcvintpipe(port->serial->dev, |
1329 | port->interrupt_in_endpointAddress), | 1329 | port->interrupt_in_endpointAddress), |
@@ -1332,7 +1332,7 @@ continue_read: | |||
1332 | cypress_read_int_callback, port, | 1332 | cypress_read_int_callback, port, |
1333 | priv->read_urb_interval); | 1333 | priv->read_urb_interval); |
1334 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); | 1334 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); |
1335 | if (result) { | 1335 | if (result && result != -EPERM) { |
1336 | dev_err(&urb->dev->dev, "%s - failed resubmitting " | 1336 | dev_err(&urb->dev->dev, "%s - failed resubmitting " |
1337 | "read urb, error %d\n", __func__, | 1337 | "read urb, error %d\n", __func__, |
1338 | result); | 1338 | result); |