diff options
Diffstat (limited to 'drivers/tty/rocket.c')
-rw-r--r-- | drivers/tty/rocket.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c index eb8311b20782..7f3b1db88061 100644 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c | |||
@@ -495,7 +495,7 @@ static void rp_handle_port(struct r_port *info) | |||
495 | if (!info) | 495 | if (!info) |
496 | return; | 496 | return; |
497 | 497 | ||
498 | if ((info->port.flags & ASYNC_INITIALIZED) == 0) { | 498 | if (!tty_port_initialized(&info->port)) { |
499 | printk(KERN_WARNING "rp: WARNING: rp_handle_port called with " | 499 | printk(KERN_WARNING "rp: WARNING: rp_handle_port called with " |
500 | "info->flags & NOT_INIT\n"); | 500 | "info->flags & NOT_INIT\n"); |
501 | return; | 501 | return; |
@@ -920,7 +920,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp) | |||
920 | /* | 920 | /* |
921 | * Info->count is now 1; so it's safe to sleep now. | 921 | * Info->count is now 1; so it's safe to sleep now. |
922 | */ | 922 | */ |
923 | if (!test_bit(ASYNCB_INITIALIZED, &port->flags)) { | 923 | if (!tty_port_initialized(port)) { |
924 | cp = &info->channel; | 924 | cp = &info->channel; |
925 | sSetRxTrigger(cp, TRIG_1); | 925 | sSetRxTrigger(cp, TRIG_1); |
926 | if (sGetChanStatus(cp) & CD_ACT) | 926 | if (sGetChanStatus(cp) & CD_ACT) |
@@ -944,7 +944,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp) | |||
944 | sEnRxFIFO(cp); | 944 | sEnRxFIFO(cp); |
945 | sEnTransmit(cp); | 945 | sEnTransmit(cp); |
946 | 946 | ||
947 | set_bit(ASYNCB_INITIALIZED, &info->port.flags); | 947 | tty_port_set_initialized(&info->port, 1); |
948 | 948 | ||
949 | /* | 949 | /* |
950 | * Set up the tty->alt_speed kludge | 950 | * Set up the tty->alt_speed kludge |
@@ -1042,9 +1042,9 @@ static void rp_close(struct tty_struct *tty, struct file *filp) | |||
1042 | } | 1042 | } |
1043 | } | 1043 | } |
1044 | spin_lock_irq(&port->lock); | 1044 | spin_lock_irq(&port->lock); |
1045 | port->flags &= ~ASYNC_INITIALIZED; | ||
1046 | tty->closing = 0; | 1045 | tty->closing = 0; |
1047 | spin_unlock_irq(&port->lock); | 1046 | spin_unlock_irq(&port->lock); |
1047 | tty_port_set_initialized(port, 0); | ||
1048 | tty_port_set_active(port, 0); | 1048 | tty_port_set_active(port, 0); |
1049 | mutex_unlock(&port->mutex); | 1049 | mutex_unlock(&port->mutex); |
1050 | tty_port_tty_set(port, NULL); | 1050 | tty_port_tty_set(port, NULL); |
@@ -1513,7 +1513,7 @@ static void rp_hangup(struct tty_struct *tty) | |||
1513 | sDisCTSFlowCtl(cp); | 1513 | sDisCTSFlowCtl(cp); |
1514 | sDisTxSoftFlowCtl(cp); | 1514 | sDisTxSoftFlowCtl(cp); |
1515 | sClrTxXOFF(cp); | 1515 | sClrTxXOFF(cp); |
1516 | clear_bit(ASYNCB_INITIALIZED, &info->port.flags); | 1516 | tty_port_set_initialized(&info->port, 0); |
1517 | 1517 | ||
1518 | wake_up_interruptible(&info->port.open_wait); | 1518 | wake_up_interruptible(&info->port.open_wait); |
1519 | } | 1519 | } |