Commit 21bed701da009b4192d9e86b3596cf210ac7369c

Authored by Alan Cox
Committed by Linus Torvalds
1 parent c1314a49d7

tty: make rocketport use standard port->flags

We need to this ready for using the standard helpers

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 19 additions and 19 deletions Side-by-side Diff

drivers/char/rocket.c
... ... @@ -499,7 +499,7 @@
499 499 if (!info)
500 500 return;
501 501  
502   - if ((info->flags & ASYNC_INITIALIZED) == 0) {
  502 + if ((info->port.flags & ASYNC_INITIALIZED) == 0) {
503 503 printk(KERN_WARNING "rp: WARNING: rp_handle_port called with "
504 504 "info->flags & NOT_INIT\n");
505 505 return;
506 506  
... ... @@ -892,11 +892,11 @@
892 892 * until it's done, and then try again.
893 893 */
894 894 if (tty_hung_up_p(filp))
895   - return ((info->flags & ASYNC_HUP_NOTIFY) ? -EAGAIN : -ERESTARTSYS);
  895 + return ((info->port.flags & ASYNC_HUP_NOTIFY) ? -EAGAIN : -ERESTARTSYS);
896 896 if (info->flags & ASYNC_CLOSING) {
897 897 if (wait_for_completion_interruptible(&info->close_wait))
898 898 return -ERESTARTSYS;
899   - return ((info->flags & ASYNC_HUP_NOTIFY) ? -EAGAIN : -ERESTARTSYS);
  899 + return ((info->port.flags & ASYNC_HUP_NOTIFY) ? -EAGAIN : -ERESTARTSYS);
900 900 }
901 901  
902 902 /*
... ... @@ -904,7 +904,7 @@
904 904 * then make the check up front and then exit.
905 905 */
906 906 if ((filp->f_flags & O_NONBLOCK) || (tty->flags & (1 << TTY_IO_ERROR))) {
907   - info->flags |= ASYNC_NORMAL_ACTIVE;
  907 + info->port.flags |= ASYNC_NORMAL_ACTIVE;
908 908 return 0;
909 909 }
910 910 if (tty->termios->c_cflag & CLOCAL)
... ... @@ -923,7 +923,7 @@
923 923 spin_lock_irqsave(&port->lock, flags);
924 924  
925 925 #ifdef ROCKET_DISABLE_SIMUSAGE
926   - info->flags |= ASYNC_NORMAL_ACTIVE;
  926 + info->port.flags |= ASYNC_NORMAL_ACTIVE;
927 927 #else
928 928 if (!tty_hung_up_p(filp)) {
929 929 extra_count = 1;
930 930  
... ... @@ -938,14 +938,14 @@
938 938 if (tty->termios->c_cflag & CBAUD)
939 939 tty_port_raise_dtr_rts(port);
940 940 set_current_state(TASK_INTERRUPTIBLE);
941   - if (tty_hung_up_p(filp) || !(info->flags & ASYNC_INITIALIZED)) {
942   - if (info->flags & ASYNC_HUP_NOTIFY)
  941 + if (tty_hung_up_p(filp) || !(info->port.flags & ASYNC_INITIALIZED)) {
  942 + if (info->port.flags & ASYNC_HUP_NOTIFY)
943 943 retval = -EAGAIN;
944 944 else
945 945 retval = -ERESTARTSYS;
946 946 break;
947 947 }
948   - if (!(info->flags & ASYNC_CLOSING) &&
  948 + if (!(info->port.flags & ASYNC_CLOSING) &&
949 949 (do_clocal || tty_port_carrier_raised(port)))
950 950 break;
951 951 if (signal_pending(current)) {
... ... @@ -954,7 +954,7 @@
954 954 }
955 955 #ifdef ROCKET_DEBUG_OPEN
956 956 printk(KERN_INFO "block_til_ready blocking: ttyR%d, count = %d, flags=0x%0x\n",
957   - info->line, port->count, info->flags);
  957 + info->line, port->count, info->port.flags);
958 958 #endif
959 959 schedule(); /* Don't hold spinlock here, will hang PC */
960 960 }
... ... @@ -975,7 +975,7 @@
975 975 #endif
976 976 if (retval)
977 977 return retval;
978   - info->flags |= ASYNC_NORMAL_ACTIVE;
  978 + info->port.flags |= ASYNC_NORMAL_ACTIVE;
979 979 return 0;
980 980 }
981 981  
982 982  
... ... @@ -998,12 +998,12 @@
998 998 if (!page)
999 999 return -ENOMEM;
1000 1000  
1001   - if (info->flags & ASYNC_CLOSING) {
  1001 + if (info->port.flags & ASYNC_CLOSING) {
1002 1002 retval = wait_for_completion_interruptible(&info->close_wait);
1003 1003 free_page(page);
1004 1004 if (retval)
1005 1005 return retval;
1006   - return ((info->flags & ASYNC_HUP_NOTIFY) ? -EAGAIN : -ERESTARTSYS);
  1006 + return ((info->port.flags & ASYNC_HUP_NOTIFY) ? -EAGAIN : -ERESTARTSYS);
1007 1007 }
1008 1008  
1009 1009 /*
... ... @@ -1032,7 +1032,7 @@
1032 1032 /*
1033 1033 * Info->count is now 1; so it's safe to sleep now.
1034 1034 */
1035   - if ((info->flags & ASYNC_INITIALIZED) == 0) {
  1035 + if ((info->port.flags & ASYNC_INITIALIZED) == 0) {
1036 1036 cp = &info->channel;
1037 1037 sSetRxTrigger(cp, TRIG_1);
1038 1038 if (sGetChanStatus(cp) & CD_ACT)
... ... @@ -1056,7 +1056,7 @@
1056 1056 sEnRxFIFO(cp);
1057 1057 sEnTransmit(cp);
1058 1058  
1059   - info->flags |= ASYNC_INITIALIZED;
  1059 + info->port.flags |= ASYNC_INITIALIZED;
1060 1060  
1061 1061 /*
1062 1062 * Set up the tty->alt_speed kludge
... ... @@ -1132,7 +1132,7 @@
1132 1132 spin_unlock_irqrestore(&port->lock, flags);
1133 1133 return;
1134 1134 }
1135   - info->flags |= ASYNC_CLOSING;
  1135 + info->port.flags |= ASYNC_CLOSING;
1136 1136 spin_unlock_irqrestore(&port->lock, flags);
1137 1137  
1138 1138 cp = &info->channel;
... ... @@ -1193,7 +1193,7 @@
1193 1193 info->xmit_buf = NULL;
1194 1194 }
1195 1195 }
1196   - info->flags &= ~(ASYNC_INITIALIZED | ASYNC_CLOSING | ASYNC_NORMAL_ACTIVE);
  1196 + info->port.flags &= ~(ASYNC_INITIALIZED | ASYNC_CLOSING | ASYNC_NORMAL_ACTIVE);
1197 1197 tty->closing = 0;
1198 1198 complete_all(&info->close_wait);
1199 1199 atomic_dec(&rp_num_ports_open);
1200 1200  
... ... @@ -1650,14 +1650,14 @@
1650 1650 printk(KERN_INFO "rp_hangup of ttyR%d...\n", info->line);
1651 1651 #endif
1652 1652 rp_flush_buffer(tty);
1653   - if (info->flags & ASYNC_CLOSING)
  1653 + if (info->port.flags & ASYNC_CLOSING)
1654 1654 return;
1655 1655 if (info->port.count)
1656 1656 atomic_dec(&rp_num_ports_open);
1657 1657 clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
1658 1658  
1659 1659 info->port.count = 0;
1660   - info->flags &= ~ASYNC_NORMAL_ACTIVE;
  1660 + info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
1661 1661 info->port.tty = NULL;
1662 1662  
1663 1663 cp = &info->channel;
... ... @@ -1667,7 +1667,7 @@
1667 1667 sDisCTSFlowCtl(cp);
1668 1668 sDisTxSoftFlowCtl(cp);
1669 1669 sClrTxXOFF(cp);
1670   - info->flags &= ~ASYNC_INITIALIZED;
  1670 + info->port.flags &= ~ASYNC_INITIALIZED;
1671 1671  
1672 1672 wake_up_interruptible(&info->port.open_wait);
1673 1673 }