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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
a108bfcb37
commit
1f87158e44
@@ -20,6 +20,7 @@
|
||||
#include <linux/usb/serial.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/kfifo.h>
|
||||
#include <linux/serial.h>
|
||||
|
||||
static int debug;
|
||||
|
||||
@@ -585,7 +586,7 @@ int usb_serial_generic_resume(struct usb_serial *serial)
|
||||
|
||||
for (i = 0; i < serial->num_ports; i++) {
|
||||
port = serial->port[i];
|
||||
if (!port->port.count)
|
||||
if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags))
|
||||
continue;
|
||||
|
||||
if (port->read_urb) {
|
||||
|
Reference in New Issue
Block a user