From 1f87158e44e79e62c8250f278c225ce4ab695f4b Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Wed, 17 Feb 2010 10:05:47 -0500 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/cypress_m8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/usb/serial/cypress_m8.c') 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) continue_read: tty_kref_put(tty); - /* Continue trying to always read... unless the port has closed. */ + /* Continue trying to always read */ - if (port->port.count > 0 && priv->comm_is_ok) { + if (priv->comm_is_ok) { usb_fill_int_urb(port->interrupt_in_urb, port->serial->dev, usb_rcvintpipe(port->serial->dev, port->interrupt_in_endpointAddress), @@ -1332,7 +1332,7 @@ continue_read: cypress_read_int_callback, port, priv->read_urb_interval); result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); - if (result) { + if (result && result != -EPERM) { dev_err(&urb->dev->dev, "%s - failed resubmitting " "read urb, error %d\n", __func__, result); -- cgit v1.2.3