aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/sierra.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-02-17 10:05:47 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:55:12 -0500
commit1f87158e44e79e62c8250f278c225ce4ab695f4b (patch)
treeeff328f63a75993a3e1ffbba9c9f0ba1fecf0edb /drivers/usb/serial/sierra.c
parenta108bfcb372d8c4452701039308fb95747911c59 (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/sierra.c')
-rw-r--r--drivers/usb/serial/sierra.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index c012e51665bd..34e6f894cba9 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -610,10 +610,10 @@ static void sierra_indat_callback(struct urb *urb)
610 } 610 }
611 611
612 /* Resubmit urb so we continue receiving */ 612 /* Resubmit urb so we continue receiving */
613 if (port->port.count && status != -ESHUTDOWN && status != -EPERM) { 613 if (status != -ESHUTDOWN && status != -EPERM) {
614 usb_mark_last_busy(port->serial->dev); 614 usb_mark_last_busy(port->serial->dev);
615 err = usb_submit_urb(urb, GFP_ATOMIC); 615 err = usb_submit_urb(urb, GFP_ATOMIC);
616 if (err) 616 if (err && err != -EPERM)
617 dev_err(&port->dev, "resubmit read urb failed." 617 dev_err(&port->dev, "resubmit read urb failed."
618 "(%d)\n", err); 618 "(%d)\n", err);
619 } 619 }
@@ -672,11 +672,11 @@ static void sierra_instat_callback(struct urb *urb)
672 dev_dbg(&port->dev, "%s: error %d\n", __func__, status); 672 dev_dbg(&port->dev, "%s: error %d\n", __func__, status);
673 673
674 /* Resubmit urb so we continue receiving IRQ data */ 674 /* Resubmit urb so we continue receiving IRQ data */
675 if (port->port.count && status != -ESHUTDOWN && status != -ENOENT) { 675 if (status != -ESHUTDOWN && status != -ENOENT) {
676 usb_mark_last_busy(serial->dev); 676 usb_mark_last_busy(serial->dev);
677 urb->dev = serial->dev; 677 urb->dev = serial->dev;
678 err = usb_submit_urb(urb, GFP_ATOMIC); 678 err = usb_submit_urb(urb, GFP_ATOMIC);
679 if (err) 679 if (err && err != -EPERM)
680 dev_err(&port->dev, "%s: resubmit intr urb " 680 dev_err(&port->dev, "%s: resubmit intr urb "
681 "failed. (%d)\n", __func__, err); 681 "failed. (%d)\n", __func__, err);
682 } 682 }