aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r--drivers/usb/serial/generic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 54e170dd3dad..ae8c0365abd6 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -473,7 +473,7 @@ static bool usb_serial_generic_msr_changed(struct tty_struct *tty,
473 * Use tty-port initialised flag to detect all hangups including the 473 * Use tty-port initialised flag to detect all hangups including the
474 * one generated at USB-device disconnect. 474 * one generated at USB-device disconnect.
475 */ 475 */
476 if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags)) 476 if (!tty_port_initialized(&port->port))
477 return true; 477 return true;
478 478
479 spin_lock_irqsave(&port->lock, flags); 479 spin_lock_irqsave(&port->lock, flags);
@@ -503,7 +503,7 @@ int usb_serial_generic_tiocmiwait(struct tty_struct *tty, unsigned long arg)
503 503
504 ret = wait_event_interruptible(port->port.delta_msr_wait, 504 ret = wait_event_interruptible(port->port.delta_msr_wait,
505 usb_serial_generic_msr_changed(tty, arg, &cnow)); 505 usb_serial_generic_msr_changed(tty, arg, &cnow));
506 if (!ret && !test_bit(ASYNCB_INITIALIZED, &port->port.flags)) 506 if (!ret && !tty_port_initialized(&port->port))
507 ret = -EIO; 507 ret = -EIO;
508 508
509 return ret; 509 return ret;
@@ -606,7 +606,7 @@ int usb_serial_generic_resume(struct usb_serial *serial)
606 606
607 for (i = 0; i < serial->num_ports; i++) { 607 for (i = 0; i < serial->num_ports; i++) {
608 port = serial->port[i]; 608 port = serial->port[i];
609 if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags)) 609 if (!tty_port_initialized(&port->port))
610 continue; 610 continue;
611 611
612 if (port->bulk_in_size) { 612 if (port->bulk_in_size) {