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/option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/serial/option.c') diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 68c7457a98ae..db0541c5df79 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -971,9 +971,9 @@ static void option_indat_callback(struct urb *urb) tty_kref_put(tty); /* Resubmit urb so we continue receiving */ - if (port->port.count && status != -ESHUTDOWN) { + if (status != -ESHUTDOWN) { err = usb_submit_urb(urb, GFP_ATOMIC); - if (err) + if (err && err != -EPERM) printk(KERN_ERR "%s: resubmit read urb failed. " "(%d)", __func__, err); else -- cgit v1.2.3-55-g7522