aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-07-16 16:55:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:12:37 -0400
commitb02f5ad6a3ff5a1ee2a7b8ec6eee338de553b060 (patch)
treeb432b32e1edbb24d6ccf34389604cf57ac2543d2
parentf1d03228ea85877584d41bccf62841e7ca47043c (diff)
istallion: use tty_port
Switch istallion to use the new tty_port structure Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/char/istallion.c116
-rw-r--r--include/linux/istallion.h6
2 files changed, 59 insertions, 63 deletions
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 7c8b62f162bf..6ef1c565705c 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -735,8 +735,8 @@ static void stli_cleanup_ports(struct stlibrd *brdp)
735 for (j = 0; j < STL_MAXPORTS; j++) { 735 for (j = 0; j < STL_MAXPORTS; j++) {
736 portp = brdp->ports[j]; 736 portp = brdp->ports[j];
737 if (portp != NULL) { 737 if (portp != NULL) {
738 if (portp->tty != NULL) 738 if (portp->port.tty != NULL)
739 tty_hangup(portp->tty); 739 tty_hangup(portp->port.tty);
740 kfree(portp); 740 kfree(portp);
741 } 741 }
742 } 742 }
@@ -811,9 +811,9 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
811 * The sleep here does not need interrupt protection since the wakeup 811 * The sleep here does not need interrupt protection since the wakeup
812 * for it is done with the same context. 812 * for it is done with the same context.
813 */ 813 */
814 if (portp->flags & ASYNC_CLOSING) { 814 if (portp->port.flags & ASYNC_CLOSING) {
815 interruptible_sleep_on(&portp->close_wait); 815 interruptible_sleep_on(&portp->port.close_wait);
816 if (portp->flags & ASYNC_HUP_NOTIFY) 816 if (portp->port.flags & ASYNC_HUP_NOTIFY)
817 return -EAGAIN; 817 return -EAGAIN;
818 return -ERESTARTSYS; 818 return -ERESTARTSYS;
819 } 819 }
@@ -824,7 +824,7 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
824 * requires several commands to the board we will need to wait for any 824 * requires several commands to the board we will need to wait for any
825 * other open that is already initializing the port. 825 * other open that is already initializing the port.
826 */ 826 */
827 portp->tty = tty; 827 portp->port.tty = tty;
828 tty->driver_data = portp; 828 tty->driver_data = portp;
829 portp->refcount++; 829 portp->refcount++;
830 830
@@ -833,10 +833,10 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
833 if (signal_pending(current)) 833 if (signal_pending(current))
834 return -ERESTARTSYS; 834 return -ERESTARTSYS;
835 835
836 if ((portp->flags & ASYNC_INITIALIZED) == 0) { 836 if ((portp->port.flags & ASYNC_INITIALIZED) == 0) {
837 set_bit(ST_INITIALIZING, &portp->state); 837 set_bit(ST_INITIALIZING, &portp->state);
838 if ((rc = stli_initopen(brdp, portp)) >= 0) { 838 if ((rc = stli_initopen(brdp, portp)) >= 0) {
839 portp->flags |= ASYNC_INITIALIZED; 839 portp->port.flags |= ASYNC_INITIALIZED;
840 clear_bit(TTY_IO_ERROR, &tty->flags); 840 clear_bit(TTY_IO_ERROR, &tty->flags);
841 } 841 }
842 clear_bit(ST_INITIALIZING, &portp->state); 842 clear_bit(ST_INITIALIZING, &portp->state);
@@ -851,9 +851,9 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
851 * The sleep here does not need interrupt protection since the wakeup 851 * The sleep here does not need interrupt protection since the wakeup
852 * for it is done with the same context. 852 * for it is done with the same context.
853 */ 853 */
854 if (portp->flags & ASYNC_CLOSING) { 854 if (portp->port.flags & ASYNC_CLOSING) {
855 interruptible_sleep_on(&portp->close_wait); 855 interruptible_sleep_on(&portp->port.close_wait);
856 if (portp->flags & ASYNC_HUP_NOTIFY) 856 if (portp->port.flags & ASYNC_HUP_NOTIFY)
857 return -EAGAIN; 857 return -EAGAIN;
858 return -ERESTARTSYS; 858 return -ERESTARTSYS;
859 } 859 }
@@ -867,7 +867,7 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
867 if ((rc = stli_waitcarrier(brdp, portp, filp)) != 0) 867 if ((rc = stli_waitcarrier(brdp, portp, filp)) != 0)
868 return rc; 868 return rc;
869 } 869 }
870 portp->flags |= ASYNC_NORMAL_ACTIVE; 870 portp->port.flags |= ASYNC_NORMAL_ACTIVE;
871 return 0; 871 return 0;
872} 872}
873 873
@@ -895,7 +895,7 @@ static void stli_close(struct tty_struct *tty, struct file *filp)
895 return; 895 return;
896 } 896 }
897 897
898 portp->flags |= ASYNC_CLOSING; 898 portp->port.flags |= ASYNC_CLOSING;
899 899
900/* 900/*
901 * May want to wait for data to drain before closing. The BUSY flag 901 * May want to wait for data to drain before closing. The BUSY flag
@@ -911,7 +911,7 @@ static void stli_close(struct tty_struct *tty, struct file *filp)
911 if (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE) 911 if (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE)
912 tty_wait_until_sent(tty, portp->closing_wait); 912 tty_wait_until_sent(tty, portp->closing_wait);
913 913
914 portp->flags &= ~ASYNC_INITIALIZED; 914 portp->port.flags &= ~ASYNC_INITIALIZED;
915 brdp = stli_brds[portp->brdnr]; 915 brdp = stli_brds[portp->brdnr];
916 stli_rawclose(brdp, portp, 0, 0); 916 stli_rawclose(brdp, portp, 0, 0);
917 if (tty->termios->c_cflag & HUPCL) { 917 if (tty->termios->c_cflag & HUPCL) {
@@ -931,16 +931,16 @@ static void stli_close(struct tty_struct *tty, struct file *filp)
931 stli_flushbuffer(tty); 931 stli_flushbuffer(tty);
932 932
933 tty->closing = 0; 933 tty->closing = 0;
934 portp->tty = NULL; 934 portp->port.tty = NULL;
935 935
936 if (portp->openwaitcnt) { 936 if (portp->openwaitcnt) {
937 if (portp->close_delay) 937 if (portp->close_delay)
938 msleep_interruptible(jiffies_to_msecs(portp->close_delay)); 938 msleep_interruptible(jiffies_to_msecs(portp->close_delay));
939 wake_up_interruptible(&portp->open_wait); 939 wake_up_interruptible(&portp->port.open_wait);
940 } 940 }
941 941
942 portp->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); 942 portp->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
943 wake_up_interruptible(&portp->close_wait); 943 wake_up_interruptible(&portp->port.close_wait);
944} 944}
945 945
946/*****************************************************************************/ 946/*****************************************************************************/
@@ -970,7 +970,7 @@ static int stli_initopen(struct stlibrd *brdp, struct stliport *portp)
970 sizeof(asynotify_t), 0)) < 0) 970 sizeof(asynotify_t), 0)) < 0)
971 return rc; 971 return rc;
972 972
973 tty = portp->tty; 973 tty = portp->port.tty;
974 if (tty == NULL) 974 if (tty == NULL)
975 return -ENODEV; 975 return -ENODEV;
976 stli_mkasyport(portp, &aport, tty->termios); 976 stli_mkasyport(portp, &aport, tty->termios);
@@ -1169,7 +1169,7 @@ static int stli_setport(struct stliport *portp)
1169 1169
1170 if (portp == NULL) 1170 if (portp == NULL)
1171 return -ENODEV; 1171 return -ENODEV;
1172 if (portp->tty == NULL) 1172 if (portp->port.tty == NULL)
1173 return -ENODEV; 1173 return -ENODEV;
1174 if (portp->brdnr >= stli_nrbrds) 1174 if (portp->brdnr >= stli_nrbrds)
1175 return -ENODEV; 1175 return -ENODEV;
@@ -1177,7 +1177,7 @@ static int stli_setport(struct stliport *portp)
1177 if (brdp == NULL) 1177 if (brdp == NULL)
1178 return -ENODEV; 1178 return -ENODEV;
1179 1179
1180 stli_mkasyport(portp, &aport, portp->tty->termios); 1180 stli_mkasyport(portp, &aport, portp->port.tty->termios);
1181 return(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0)); 1181 return(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0));
1182} 1182}
1183 1183
@@ -1196,7 +1196,7 @@ static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct
1196 rc = 0; 1196 rc = 0;
1197 doclocal = 0; 1197 doclocal = 0;
1198 1198
1199 if (portp->tty->termios->c_cflag & CLOCAL) 1199 if (portp->port.tty->termios->c_cflag & CLOCAL)
1200 doclocal++; 1200 doclocal++;
1201 1201
1202 spin_lock_irqsave(&stli_lock, flags); 1202 spin_lock_irqsave(&stli_lock, flags);
@@ -1211,14 +1211,14 @@ static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct
1211 &portp->asig, sizeof(asysigs_t), 0)) < 0) 1211 &portp->asig, sizeof(asysigs_t), 0)) < 0)
1212 break; 1212 break;
1213 if (tty_hung_up_p(filp) || 1213 if (tty_hung_up_p(filp) ||
1214 ((portp->flags & ASYNC_INITIALIZED) == 0)) { 1214 ((portp->port.flags & ASYNC_INITIALIZED) == 0)) {
1215 if (portp->flags & ASYNC_HUP_NOTIFY) 1215 if (portp->port.flags & ASYNC_HUP_NOTIFY)
1216 rc = -EBUSY; 1216 rc = -EBUSY;
1217 else 1217 else
1218 rc = -ERESTARTSYS; 1218 rc = -ERESTARTSYS;
1219 break; 1219 break;
1220 } 1220 }
1221 if (((portp->flags & ASYNC_CLOSING) == 0) && 1221 if (((portp->port.flags & ASYNC_CLOSING) == 0) &&
1222 (doclocal || (portp->sigs & TIOCM_CD))) { 1222 (doclocal || (portp->sigs & TIOCM_CD))) {
1223 break; 1223 break;
1224 } 1224 }
@@ -1226,7 +1226,7 @@ static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct
1226 rc = -ERESTARTSYS; 1226 rc = -ERESTARTSYS;
1227 break; 1227 break;
1228 } 1228 }
1229 interruptible_sleep_on(&portp->open_wait); 1229 interruptible_sleep_on(&portp->port.open_wait);
1230 } 1230 }
1231 1231
1232 spin_lock_irqsave(&stli_lock, flags); 1232 spin_lock_irqsave(&stli_lock, flags);
@@ -1548,7 +1548,7 @@ static int stli_getserial(struct stliport *portp, struct serial_struct __user *s
1548 sio.type = PORT_UNKNOWN; 1548 sio.type = PORT_UNKNOWN;
1549 sio.line = portp->portnr; 1549 sio.line = portp->portnr;
1550 sio.irq = 0; 1550 sio.irq = 0;
1551 sio.flags = portp->flags; 1551 sio.flags = portp->port.flags;
1552 sio.baud_base = portp->baud_base; 1552 sio.baud_base = portp->baud_base;
1553 sio.close_delay = portp->close_delay; 1553 sio.close_delay = portp->close_delay;
1554 sio.closing_wait = portp->closing_wait; 1554 sio.closing_wait = portp->closing_wait;
@@ -1583,11 +1583,11 @@ static int stli_setserial(struct stliport *portp, struct serial_struct __user *s
1583 if ((sio.baud_base != portp->baud_base) || 1583 if ((sio.baud_base != portp->baud_base) ||
1584 (sio.close_delay != portp->close_delay) || 1584 (sio.close_delay != portp->close_delay) ||
1585 ((sio.flags & ~ASYNC_USR_MASK) != 1585 ((sio.flags & ~ASYNC_USR_MASK) !=
1586 (portp->flags & ~ASYNC_USR_MASK))) 1586 (portp->port.flags & ~ASYNC_USR_MASK)))
1587 return -EPERM; 1587 return -EPERM;
1588 } 1588 }
1589 1589
1590 portp->flags = (portp->flags & ~ASYNC_USR_MASK) | 1590 portp->port.flags = (portp->port.flags & ~ASYNC_USR_MASK) |
1591 (sio.flags & ASYNC_USR_MASK); 1591 (sio.flags & ASYNC_USR_MASK);
1592 portp->baud_base = sio.baud_base; 1592 portp->baud_base = sio.baud_base;
1593 portp->close_delay = sio.close_delay; 1593 portp->close_delay = sio.close_delay;
@@ -1751,7 +1751,7 @@ static void stli_settermios(struct tty_struct *tty, struct ktermios *old)
1751 if ((old->c_cflag & CRTSCTS) && ((tiosp->c_cflag & CRTSCTS) == 0)) 1751 if ((old->c_cflag & CRTSCTS) && ((tiosp->c_cflag & CRTSCTS) == 0))
1752 tty->hw_stopped = 0; 1752 tty->hw_stopped = 0;
1753 if (((old->c_cflag & CLOCAL) == 0) && (tiosp->c_cflag & CLOCAL)) 1753 if (((old->c_cflag & CLOCAL) == 0) && (tiosp->c_cflag & CLOCAL))
1754 wake_up_interruptible(&portp->open_wait); 1754 wake_up_interruptible(&portp->port.open_wait);
1755} 1755}
1756 1756
1757/*****************************************************************************/ 1757/*****************************************************************************/
@@ -1834,7 +1834,7 @@ static void stli_hangup(struct tty_struct *tty)
1834 if (brdp == NULL) 1834 if (brdp == NULL)
1835 return; 1835 return;
1836 1836
1837 portp->flags &= ~ASYNC_INITIALIZED; 1837 portp->port.flags &= ~ASYNC_INITIALIZED;
1838 1838
1839 if (!test_bit(ST_CLOSING, &portp->state)) 1839 if (!test_bit(ST_CLOSING, &portp->state))
1840 stli_rawclose(brdp, portp, 0, 0); 1840 stli_rawclose(brdp, portp, 0, 0);
@@ -1855,12 +1855,12 @@ static void stli_hangup(struct tty_struct *tty)
1855 clear_bit(ST_TXBUSY, &portp->state); 1855 clear_bit(ST_TXBUSY, &portp->state);
1856 clear_bit(ST_RXSTOP, &portp->state); 1856 clear_bit(ST_RXSTOP, &portp->state);
1857 set_bit(TTY_IO_ERROR, &tty->flags); 1857 set_bit(TTY_IO_ERROR, &tty->flags);
1858 portp->tty = NULL; 1858 portp->port.tty = NULL;
1859 portp->flags &= ~ASYNC_NORMAL_ACTIVE; 1859 portp->port.flags &= ~ASYNC_NORMAL_ACTIVE;
1860 portp->refcount = 0; 1860 portp->refcount = 0;
1861 spin_unlock_irqrestore(&stli_lock, flags); 1861 spin_unlock_irqrestore(&stli_lock, flags);
1862 1862
1863 wake_up_interruptible(&portp->open_wait); 1863 wake_up_interruptible(&portp->port.open_wait);
1864} 1864}
1865 1865
1866/*****************************************************************************/ 1866/*****************************************************************************/
@@ -2188,7 +2188,7 @@ static void stli_read(struct stlibrd *brdp, struct stliport *portp)
2188 2188
2189 if (test_bit(ST_RXSTOP, &portp->state)) 2189 if (test_bit(ST_RXSTOP, &portp->state))
2190 return; 2190 return;
2191 tty = portp->tty; 2191 tty = portp->port.tty;
2192 if (tty == NULL) 2192 if (tty == NULL)
2193 return; 2193 return;
2194 2194
@@ -2362,7 +2362,7 @@ static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp)
2362 if (ap->notify) { 2362 if (ap->notify) {
2363 nt = ap->changed; 2363 nt = ap->changed;
2364 ap->notify = 0; 2364 ap->notify = 0;
2365 tty = portp->tty; 2365 tty = portp->port.tty;
2366 2366
2367 if (nt.signal & SG_DCD) { 2367 if (nt.signal & SG_DCD) {
2368 oldsigs = portp->sigs; 2368 oldsigs = portp->sigs;
@@ -2370,10 +2370,10 @@ static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp)
2370 clear_bit(ST_GETSIGS, &portp->state); 2370 clear_bit(ST_GETSIGS, &portp->state);
2371 if ((portp->sigs & TIOCM_CD) && 2371 if ((portp->sigs & TIOCM_CD) &&
2372 ((oldsigs & TIOCM_CD) == 0)) 2372 ((oldsigs & TIOCM_CD) == 0))
2373 wake_up_interruptible(&portp->open_wait); 2373 wake_up_interruptible(&portp->port.open_wait);
2374 if ((oldsigs & TIOCM_CD) && 2374 if ((oldsigs & TIOCM_CD) &&
2375 ((portp->sigs & TIOCM_CD) == 0)) { 2375 ((portp->sigs & TIOCM_CD) == 0)) {
2376 if (portp->flags & ASYNC_CHECK_CD) { 2376 if (portp->port.flags & ASYNC_CHECK_CD) {
2377 if (tty) 2377 if (tty)
2378 tty_hangup(tty); 2378 tty_hangup(tty);
2379 } 2379 }
@@ -2392,7 +2392,7 @@ static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp)
2392 if ((nt.data & DT_RXBREAK) && (portp->rxmarkmsk & BRKINT)) { 2392 if ((nt.data & DT_RXBREAK) && (portp->rxmarkmsk & BRKINT)) {
2393 if (tty != NULL) { 2393 if (tty != NULL) {
2394 tty_insert_flip_char(tty, 0, TTY_BREAK); 2394 tty_insert_flip_char(tty, 0, TTY_BREAK);
2395 if (portp->flags & ASYNC_SAK) { 2395 if (portp->port.flags & ASYNC_SAK) {
2396 do_SAK(tty); 2396 do_SAK(tty);
2397 EBRDENABLE(brdp); 2397 EBRDENABLE(brdp);
2398 } 2398 }
@@ -2542,17 +2542,17 @@ static void stli_mkasyport(struct stliport *portp, asyport_t *pp, struct ktermio
2542/* 2542/*
2543 * Start of by setting the baud, char size, parity and stop bit info. 2543 * Start of by setting the baud, char size, parity and stop bit info.
2544 */ 2544 */
2545 pp->baudout = tty_get_baud_rate(portp->tty); 2545 pp->baudout = tty_get_baud_rate(portp->port.tty);
2546 if ((tiosp->c_cflag & CBAUD) == B38400) { 2546 if ((tiosp->c_cflag & CBAUD) == B38400) {
2547 if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) 2547 if ((portp->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
2548 pp->baudout = 57600; 2548 pp->baudout = 57600;
2549 else if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) 2549 else if ((portp->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
2550 pp->baudout = 115200; 2550 pp->baudout = 115200;
2551 else if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI) 2551 else if ((portp->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
2552 pp->baudout = 230400; 2552 pp->baudout = 230400;
2553 else if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP) 2553 else if ((portp->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
2554 pp->baudout = 460800; 2554 pp->baudout = 460800;
2555 else if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) 2555 else if ((portp->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
2556 pp->baudout = (portp->baud_base / portp->custom_divisor); 2556 pp->baudout = (portp->baud_base / portp->custom_divisor);
2557 } 2557 }
2558 if (pp->baudout > STL_MAXBAUD) 2558 if (pp->baudout > STL_MAXBAUD)
@@ -2625,9 +2625,9 @@ static void stli_mkasyport(struct stliport *portp, asyport_t *pp, struct ktermio
2625 * Set up clocal processing as required. 2625 * Set up clocal processing as required.
2626 */ 2626 */
2627 if (tiosp->c_cflag & CLOCAL) 2627 if (tiosp->c_cflag & CLOCAL)
2628 portp->flags &= ~ASYNC_CHECK_CD; 2628 portp->port.flags &= ~ASYNC_CHECK_CD;
2629 else 2629 else
2630 portp->flags |= ASYNC_CHECK_CD; 2630 portp->port.flags |= ASYNC_CHECK_CD;
2631 2631
2632/* 2632/*
2633 * Transfer any persistent flags into the asyport structure. 2633 * Transfer any persistent flags into the asyport structure.
@@ -2703,8 +2703,8 @@ static int stli_initports(struct stlibrd *brdp)
2703 portp->baud_base = STL_BAUDBASE; 2703 portp->baud_base = STL_BAUDBASE;
2704 portp->close_delay = STL_CLOSEDELAY; 2704 portp->close_delay = STL_CLOSEDELAY;
2705 portp->closing_wait = 30 * HZ; 2705 portp->closing_wait = 30 * HZ;
2706 init_waitqueue_head(&portp->open_wait); 2706 init_waitqueue_head(&portp->port.open_wait);
2707 init_waitqueue_head(&portp->close_wait); 2707 init_waitqueue_head(&portp->port.close_wait);
2708 init_waitqueue_head(&portp->raw_wait); 2708 init_waitqueue_head(&portp->raw_wait);
2709 panelport++; 2709 panelport++;
2710 if (panelport >= brdp->panels[panelnr]) { 2710 if (panelport >= brdp->panels[panelnr]) {
@@ -4246,18 +4246,18 @@ static int stli_portcmdstats(struct stliport *portp)
4246 stli_comstats.panel = portp->panelnr; 4246 stli_comstats.panel = portp->panelnr;
4247 stli_comstats.port = portp->portnr; 4247 stli_comstats.port = portp->portnr;
4248 stli_comstats.state = portp->state; 4248 stli_comstats.state = portp->state;
4249 stli_comstats.flags = portp->flags; 4249 stli_comstats.flags = portp->port.flag;
4250 4250
4251 spin_lock_irqsave(&brd_lock, flags); 4251 spin_lock_irqsave(&brd_lock, flags);
4252 if (portp->tty != NULL) { 4252 if (portp->port.tty != NULL) {
4253 if (portp->tty->driver_data == portp) { 4253 if (portp->port.tty->driver_data == portp) {
4254 stli_comstats.ttystate = portp->tty->flags; 4254 stli_comstats.ttystate = portp->port.tty->flags;
4255 stli_comstats.rxbuffered = -1; 4255 stli_comstats.rxbuffered = -1;
4256 if (portp->tty->termios != NULL) { 4256 if (portp->port.tty->termios != NULL) {
4257 stli_comstats.cflags = portp->tty->termios->c_cflag; 4257 stli_comstats.cflags = portp->port.tty->termios->c_cflag;
4258 stli_comstats.iflags = portp->tty->termios->c_iflag; 4258 stli_comstats.iflags = portp->port.tty->termios->c_iflag;
4259 stli_comstats.oflags = portp->tty->termios->c_oflag; 4259 stli_comstats.oflags = portp->port.tty->termios->c_oflag;
4260 stli_comstats.lflags = portp->tty->termios->c_lflag; 4260 stli_comstats.lflags = portp->port.tty->termios->c_lflag;
4261 } 4261 }
4262 } 4262 }
4263 } 4263 }
diff --git a/include/linux/istallion.h b/include/linux/istallion.h
index 5a84fe944b74..0d1840723249 100644
--- a/include/linux/istallion.h
+++ b/include/linux/istallion.h
@@ -51,25 +51,21 @@
51 */ 51 */
52struct stliport { 52struct stliport {
53 unsigned long magic; 53 unsigned long magic;
54 struct tty_port port;
54 unsigned int portnr; 55 unsigned int portnr;
55 unsigned int panelnr; 56 unsigned int panelnr;
56 unsigned int brdnr; 57 unsigned int brdnr;
57 unsigned long state; 58 unsigned long state;
58 unsigned int devnr; 59 unsigned int devnr;
59 int flags;
60 int baud_base; 60 int baud_base;
61 int custom_divisor; 61 int custom_divisor;
62 int close_delay; 62 int close_delay;
63 int closing_wait; 63 int closing_wait;
64 int refcount;
65 int openwaitcnt; 64 int openwaitcnt;
66 int rc; 65 int rc;
67 int argsize; 66 int argsize;
68 void *argp; 67 void *argp;
69 unsigned int rxmarkmsk; 68 unsigned int rxmarkmsk;
70 struct tty_struct *tty;
71 wait_queue_head_t open_wait;
72 wait_queue_head_t close_wait;
73 wait_queue_head_t raw_wait; 69 wait_queue_head_t raw_wait;
74 struct asysigs asig; 70 struct asysigs asig;
75 unsigned long addr; 71 unsigned long addr;