diff options
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r-- | drivers/usb/serial/generic.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 83443d6306d6..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 | ||
24 | static int debug; | 25 | static int debug; |
25 | 26 | ||
@@ -41,7 +42,7 @@ static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */ | |||
41 | 42 | ||
42 | /* we want to look at all devices, as the vendor/product id can change | 43 | /* we want to look at all devices, as the vendor/product id can change |
43 | * depending on the command line argument */ | 44 | * depending on the command line argument */ |
44 | static struct usb_device_id generic_serial_ids[] = { | 45 | static const struct usb_device_id generic_serial_ids[] = { |
45 | {.driver_info = 42}, | 46 | {.driver_info = 42}, |
46 | {} | 47 | {} |
47 | }; | 48 | }; |
@@ -194,7 +195,7 @@ static int usb_serial_multi_urb_write(struct tty_struct *tty, | |||
194 | if (port->urbs_in_flight > | 195 | if (port->urbs_in_flight > |
195 | port->serial->type->max_in_flight_urbs) { | 196 | port->serial->type->max_in_flight_urbs) { |
196 | spin_unlock_irqrestore(&port->lock, flags); | 197 | spin_unlock_irqrestore(&port->lock, flags); |
197 | dbg("%s - write limit hit\n", __func__); | 198 | dbg("%s - write limit hit", __func__); |
198 | return bwrite; | 199 | return bwrite; |
199 | } | 200 | } |
200 | port->tx_bytes_flight += towrite; | 201 | port->tx_bytes_flight += towrite; |
@@ -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) { |