aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/generic.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/generic.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/generic.c')
-rw-r--r--drivers/usb/serial/generic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 5288203d883f..89fac36684c5 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -20,6 +20,7 @@
20#include <linux/usb/serial.h> 20#include <linux/usb/serial.h>
21#include <linux/uaccess.h> 21#include <linux/uaccess.h>
22#include <linux/kfifo.h> 22#include <linux/kfifo.h>
23#include <linux/serial.h>
23 24
24static int debug; 25static int debug;
25 26
@@ -585,7 +586,7 @@ int usb_serial_generic_resume(struct usb_serial *serial)
585 586
586 for (i = 0; i < serial->num_ports; i++) { 587 for (i = 0; i < serial->num_ports; i++) {
587 port = serial->port[i]; 588 port = serial->port[i];
588 if (!port->port.count) 589 if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags))
589 continue; 590 continue;
590 591
591 if (port->read_urb) { 592 if (port->read_urb) {