Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Fix compile errors in SGI console drivers (linux-next tree)

The below is the patch to replace blindly all possible places,
including Jack's fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
(Reviewed and checked rather than blindly added)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Takashi Iwai and committed by
Linus Torvalds
a88487c7 b1ca7e7a

+151 -147
+3 -3
drivers/serial/21285.c
··· 86 86 static irqreturn_t serial21285_rx_chars(int irq, void *dev_id) 87 87 { 88 88 struct uart_port *port = dev_id; 89 - struct tty_struct *tty = port->info->tty; 89 + struct tty_struct *tty = port->info->port.tty; 90 90 unsigned int status, ch, flag, rxs, max_count = 256; 91 91 92 92 status = *CSR_UARTFLG; ··· 235 235 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 236 236 quot = uart_get_divisor(port, baud); 237 237 238 - if (port->info && port->info->tty) { 239 - struct tty_struct *tty = port->info->tty; 238 + if (port->info && port->info->port.tty) { 239 + struct tty_struct *tty = port->info->port.tty; 240 240 unsigned int b = port->uartclk / (16 * quot); 241 241 tty_encode_baud_rate(tty, b, b); 242 242 }
+15 -15
drivers/serial/68328serial.c
··· 249 249 { 250 250 #if 0 251 251 if(status & DCD) { 252 - if((info->tty->termios->c_cflag & CRTSCTS) && 252 + if((info->port.tty->termios->c_cflag & CRTSCTS) && 253 253 ((info->curregs[3] & AUTO_ENAB)==0)) { 254 254 info->curregs[3] |= AUTO_ENAB; 255 255 info->pendregs[3] |= AUTO_ENAB; ··· 274 274 275 275 static void receive_chars(struct m68k_serial *info, unsigned short rx) 276 276 { 277 - struct tty_struct *tty = info->tty; 277 + struct tty_struct *tty = info->port.tty; 278 278 m68328_uart *uart = &uart_addr[info->line]; 279 279 unsigned char ch, flag; 280 280 ··· 345 345 goto clear_and_return; 346 346 } 347 347 348 - if((info->xmit_cnt <= 0) || info->tty->stopped) { 348 + if((info->xmit_cnt <= 0) || info->port.tty->stopped) { 349 349 /* That's peculiar... TX ints off */ 350 350 uart->ustcnt &= ~USTCNT_TX_INTR_MASK; 351 351 goto clear_and_return; ··· 403 403 struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue); 404 404 struct tty_struct *tty; 405 405 406 - tty = info->tty; 406 + tty = info->port.tty; 407 407 if (!tty) 408 408 return; 409 409 #if 0 ··· 427 427 struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue_hangup); 428 428 struct tty_struct *tty; 429 429 430 - tty = info->tty; 430 + tty = info->port.tty; 431 431 if (!tty) 432 432 return; 433 433 ··· 471 471 uart->ustcnt = USTCNT_UEN | USTCNT_RXEN | USTCNT_RX_INTR_MASK; 472 472 #endif 473 473 474 - if (info->tty) 475 - clear_bit(TTY_IO_ERROR, &info->tty->flags); 474 + if (info->port.tty) 475 + clear_bit(TTY_IO_ERROR, &info->port.tty->flags); 476 476 info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; 477 477 478 478 /* ··· 506 506 info->xmit_buf = 0; 507 507 } 508 508 509 - if (info->tty) 510 - set_bit(TTY_IO_ERROR, &info->tty->flags); 509 + if (info->port.tty) 510 + set_bit(TTY_IO_ERROR, &info->port.tty->flags); 511 511 512 512 info->flags &= ~S_INITIALIZED; 513 513 local_irq_restore(flags); ··· 573 573 unsigned cflag; 574 574 int i; 575 575 576 - if (!info->tty || !info->tty->termios) 576 + if (!info->port.tty || !info->port.tty->termios) 577 577 return; 578 - cflag = info->tty->termios->c_cflag; 578 + cflag = info->port.tty->termios->c_cflag; 579 579 if (!(port = info->port)) 580 580 return; 581 581 ··· 1131 1131 tty_ldisc_flush(tty); 1132 1132 tty->closing = 0; 1133 1133 info->event = 0; 1134 - info->tty = 0; 1134 + info->port.tty = NULL; 1135 1135 #warning "This is not and has never been valid so fix it" 1136 1136 #if 0 1137 1137 if (tty->ldisc.num != ldiscs[N_TTY].num) { ··· 1169 1169 info->event = 0; 1170 1170 info->count = 0; 1171 1171 info->flags &= ~S_NORMAL_ACTIVE; 1172 - info->tty = 0; 1172 + info->port.tty = NULL; 1173 1173 wake_up_interruptible(&info->open_wait); 1174 1174 } 1175 1175 ··· 1286 1286 1287 1287 info->count++; 1288 1288 tty->driver_data = info; 1289 - info->tty = tty; 1289 + info->port.tty = tty; 1290 1290 1291 1291 /* 1292 1292 * Start up serial port ··· 1363 1363 info = &m68k_soft[i]; 1364 1364 info->magic = SERIAL_MAGIC; 1365 1365 info->port = (int) &uart_addr[i]; 1366 - info->tty = 0; 1366 + info->port.tty = NULL; 1367 1367 info->irq = uart_irqs[i]; 1368 1368 info->custom_divisor = 16; 1369 1369 info->close_delay = 50;
+26 -26
drivers/serial/68360serial.c
··· 393 393 394 394 static _INLINE_ void receive_chars(ser_info_t *info) 395 395 { 396 - struct tty_struct *tty = info->tty; 396 + struct tty_struct *tty = info->port.tty; 397 397 unsigned char ch, flag, *cp; 398 398 /*int ignored = 0;*/ 399 399 int i; ··· 514 514 515 515 static _INLINE_ void receive_break(ser_info_t *info) 516 516 { 517 - struct tty_struct *tty = info->tty; 517 + struct tty_struct *tty = info->port.tty; 518 518 519 519 info->state->icount.brk++; 520 520 /* Check to see if there is room in the tty buffer for ··· 528 528 { 529 529 530 530 if ((info->flags & TX_WAKEUP) || 531 - (info->tty->flags & (1 << TTY_DO_WRITE_WAKEUP))) { 531 + (info->port.tty->flags & (1 << TTY_DO_WRITE_WAKEUP))) { 532 532 schedule_work(&info->tqueue); 533 533 } 534 534 ··· 584 584 } 585 585 } 586 586 if (info->flags & ASYNC_CTS_FLOW) { 587 - if (info->tty->hw_stopped) { 587 + if (info->port.tty->hw_stopped) { 588 588 if (status & UART_MSR_CTS) { 589 589 #if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW)) 590 590 printk("CTS tx start..."); 591 591 #endif 592 - info->tty->hw_stopped = 0; 592 + info->port.tty->hw_stopped = 0; 593 593 info->IER |= UART_IER_THRI; 594 594 serial_out(info, UART_IER, info->IER); 595 595 rs_sched_event(info, RS_EVENT_WRITE_WAKEUP); ··· 600 600 #if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW)) 601 601 printk("CTS tx stop..."); 602 602 #endif 603 - info->tty->hw_stopped = 1; 603 + info->port.tty->hw_stopped = 1; 604 604 info->IER &= ~UART_IER_THRI; 605 605 serial_out(info, UART_IER, info->IER); 606 606 } ··· 670 670 ser_info_t *info = (ser_info_t *) private_; 671 671 struct tty_struct *tty; 672 672 673 - tty = info->tty; 673 + tty = info->port.tty; 674 674 if (!tty) 675 675 return; 676 676 ··· 693 693 struct async_struct *info = (struct async_struct *) private_; 694 694 struct tty_struct *tty; 695 695 696 - tty = info->tty; 696 + tty = info->port.tty; 697 697 if (!tty) 698 698 return; 699 699 ··· 721 721 722 722 #ifdef maybe 723 723 if (!state->port || !state->type) { 724 - if (info->tty) 725 - set_bit(TTY_IO_ERROR, &info->tty->flags); 724 + if (info->port.tty) 725 + set_bit(TTY_IO_ERROR, &info->port.tty->flags); 726 726 goto errout; 727 727 } 728 728 #endif ··· 734 734 735 735 #ifdef modem_control 736 736 info->MCR = 0; 737 - if (info->tty->termios->c_cflag & CBAUD) 737 + if (info->port.tty->termios->c_cflag & CBAUD) 738 738 info->MCR = UART_MCR_DTR | UART_MCR_RTS; 739 739 #endif 740 740 741 - if (info->tty) 742 - clear_bit(TTY_IO_ERROR, &info->tty->flags); 741 + if (info->port.tty) 742 + clear_bit(TTY_IO_ERROR, &info->port.tty->flags); 743 743 744 744 /* 745 745 * and set the speed of the serial port ··· 842 842 smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); 843 843 } 844 844 845 - if (info->tty) 846 - set_bit(TTY_IO_ERROR, &info->tty->flags); 845 + if (info->port.tty) 846 + set_bit(TTY_IO_ERROR, &info->port.tty->flags); 847 847 848 848 info->flags &= ~ASYNC_INITIALIZED; 849 849 local_irq_restore(flags); ··· 863 863 volatile struct smc_regs *smcp; 864 864 volatile struct scc_regs *sccp; 865 865 866 - if (!info->tty || !info->tty->termios) 866 + if (!info->port.tty || !info->port.tty->termios) 867 867 return; 868 - cflag = info->tty->termios->c_cflag; 868 + cflag = info->port.tty->termios->c_cflag; 869 869 870 870 state = info->state; 871 871 ··· 936 936 * Set up parity check flag 937 937 */ 938 938 info->read_status_mask = (BD_SC_EMPTY | BD_SC_OV); 939 - if (I_INPCK(info->tty)) 939 + if (I_INPCK(info->port.tty)) 940 940 info->read_status_mask |= BD_SC_FR | BD_SC_PR; 941 - if (I_BRKINT(info->tty) || I_PARMRK(info->tty)) 941 + if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty)) 942 942 info->read_status_mask |= BD_SC_BR; 943 943 944 944 /* 945 945 * Characters to ignore 946 946 */ 947 947 info->ignore_status_mask = 0; 948 - if (I_IGNPAR(info->tty)) 948 + if (I_IGNPAR(info->port.tty)) 949 949 info->ignore_status_mask |= BD_SC_PR | BD_SC_FR; 950 - if (I_IGNBRK(info->tty)) { 950 + if (I_IGNBRK(info->port.tty)) { 951 951 info->ignore_status_mask |= BD_SC_BR; 952 952 /* 953 953 * If we're ignore parity and break indicators, ignore 954 954 * overruns too. (For real raw support). 955 955 */ 956 - if (I_IGNPAR(info->tty)) 956 + if (I_IGNPAR(info->port.tty)) 957 957 info->ignore_status_mask |= BD_SC_OV; 958 958 } 959 959 /* ··· 1658 1658 tty_ldisc_flush(tty); 1659 1659 tty->closing = 0; 1660 1660 info->event = 0; 1661 - info->tty = 0; 1661 + info->port.tty = NULL; 1662 1662 if (info->blocked_open) { 1663 1663 if (info->close_delay) { 1664 1664 msleep_interruptible(jiffies_to_msecs(info->close_delay)); ··· 1758 1758 info->event = 0; 1759 1759 state->count = 0; 1760 1760 info->flags &= ~ASYNC_NORMAL_ACTIVE; 1761 - info->tty = 0; 1761 + info->port.tty = NULL; 1762 1762 wake_up_interruptible(&info->open_wait); 1763 1763 } 1764 1764 ··· 1919 1919 printk("rs_open %s, count = %d\n", tty->name, info->state->count); 1920 1920 #endif 1921 1921 tty->driver_data = info; 1922 - info->tty = tty; 1922 + info->port.tty = tty; 1923 1923 1924 1924 /* 1925 1925 * Start up serial port ··· 1976 1976 info->port = state->port; 1977 1977 info->flags = state->flags; 1978 1978 info->quot = 0; 1979 - info->tty = 0; 1979 + info->port.tty = NULL; 1980 1980 } 1981 1981 local_irq_disable(); 1982 1982 status = serial_in(info, UART_MSR);
+1 -1
drivers/serial/amba-pl010.c
··· 117 117 118 118 static void pl010_rx_chars(struct uart_amba_port *uap) 119 119 { 120 - struct tty_struct *tty = uap->port.info->tty; 120 + struct tty_struct *tty = uap->port.info->port.tty; 121 121 unsigned int status, ch, flag, rsr, max_count = 256; 122 122 123 123 status = readb(uap->port.membase + UART01x_FR);
+1 -1
drivers/serial/amba-pl011.c
··· 107 107 108 108 static void pl011_rx_chars(struct uart_amba_port *uap) 109 109 { 110 - struct tty_struct *tty = uap->port.info->tty; 110 + struct tty_struct *tty = uap->port.info->port.tty; 111 111 unsigned int status, ch, flag, max_count = 256; 112 112 113 113 status = readw(uap->port.membase + UART01x_FR);
+5 -5
drivers/serial/bfin_5xx.c
··· 175 175 #ifdef CONFIG_SERIAL_BFIN_PIO 176 176 static void bfin_serial_rx_chars(struct bfin_serial_port *uart) 177 177 { 178 - struct tty_struct *tty = uart->port.info->tty; 178 + struct tty_struct *tty = uart->port.info->port.tty; 179 179 unsigned int status, ch, flg; 180 180 static struct timeval anomaly_start = { .tv_sec = 0 }; 181 181 ··· 393 393 394 394 static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart) 395 395 { 396 - struct tty_struct *tty = uart->port.info->tty; 396 + struct tty_struct *tty = uart->port.info->port.tty; 397 397 int i, flg, status; 398 398 399 399 status = UART_GET_LSR(uart); ··· 552 552 #ifdef CONFIG_SERIAL_BFIN_CTSRTS 553 553 unsigned int status; 554 554 struct uart_info *info = uart->port.info; 555 - struct tty_struct *tty = info->tty; 555 + struct tty_struct *tty = info->port.tty; 556 556 557 557 status = bfin_serial_get_mctrl(&uart->port); 558 558 uart_handle_cts_change(&uart->port, status & TIOCM_CTS); ··· 814 814 int line = port->line; 815 815 unsigned short val; 816 816 817 - if (line >= port->info->tty->driver->num) 817 + if (line >= port->info->port.tty->driver->num) 818 818 return; 819 819 820 - switch (port->info->tty->ldisc.num) { 820 + switch (port->info->port.tty->ldisc.num) { 821 821 case N_IRDA: 822 822 val = UART_GET_GCTL(&bfin_serial_ports[line]); 823 823 val |= (IREN | RPOLC);
+2 -2
drivers/serial/bfin_sport_uart.c
··· 174 174 static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id) 175 175 { 176 176 struct sport_uart_port *up = dev_id; 177 - struct tty_struct *tty = up->port.info->tty; 177 + struct tty_struct *tty = up->port.info->port.tty; 178 178 unsigned int ch; 179 179 180 180 do { ··· 201 201 static irqreturn_t sport_uart_err_irq(int irq, void *dev_id) 202 202 { 203 203 struct sport_uart_port *up = dev_id; 204 - struct tty_struct *tty = up->port.info->tty; 204 + struct tty_struct *tty = up->port.info->port.tty; 205 205 unsigned int stat = SPORT_GET_STAT(up); 206 206 207 207 /* Overflow in RX FIFO */
+1 -1
drivers/serial/clps711x.c
··· 93 93 static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id) 94 94 { 95 95 struct uart_port *port = dev_id; 96 - struct tty_struct *tty = port->info->tty; 96 + struct tty_struct *tty = port->info->port.tty; 97 97 unsigned int status, ch, flg; 98 98 99 99 status = clps_readl(SYSFLG(port));
+41 -38
drivers/serial/crisv10.c
··· 968 968 /* Calculate the chartime depending on baudrate, numbor of bits etc. */ 969 969 static void update_char_time(struct e100_serial * info) 970 970 { 971 - tcflag_t cflags = info->tty->termios->c_cflag; 971 + tcflag_t cflags = info->port.tty->termios->c_cflag; 972 972 int bits; 973 973 974 974 /* calc. number of bits / data byte */ ··· 1483 1483 CIRC_CNT(info->xmit.head, 1484 1484 info->xmit.tail,SERIAL_XMIT_SIZE))); 1485 1485 1486 - xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, STOP_CHAR(info->tty)); 1486 + xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, 1487 + STOP_CHAR(info->port.tty)); 1487 1488 xoff |= IO_STATE(R_SERIAL0_XOFF, tx_stop, stop); 1488 1489 if (tty->termios->c_iflag & IXON ) { 1489 1490 xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); ··· 1773 1772 1774 1773 info->icount.rx++; 1775 1774 } else { 1776 - struct tty_struct *tty = info->tty; 1775 + struct tty_struct *tty = info->port.tty; 1777 1776 tty_insert_flip_char(tty, data, flag); 1778 1777 info->icount.rx++; 1779 1778 } ··· 1839 1838 descr->status = 0; 1840 1839 1841 1840 DFLOW( DEBUG_LOG(info->line, "RX %lu\n", recvl); 1842 - if (info->tty->stopped) { 1841 + if (info->port.tty->stopped) { 1843 1842 unsigned char *buf = phys_to_virt(descr->buf); 1844 1843 DEBUG_LOG(info->line, "rx 0x%02X\n", buf[0]); 1845 1844 DEBUG_LOG(info->line, "rx 0x%02X\n", buf[1]); ··· 1873 1872 IO_STATE(R_DMA_CH6_CLR_INTR, clr_descr, do) | 1874 1873 IO_STATE(R_DMA_CH6_CLR_INTR, clr_eop, do); 1875 1874 1876 - tty = info->tty; 1875 + tty = info->port.tty; 1877 1876 if (!tty) /* Something wrong... */ 1878 1877 return; 1879 1878 ··· 2123 2122 unsigned long flags; 2124 2123 2125 2124 local_irq_save(flags); 2126 - tty = info->tty; 2125 + tty = info->port.tty; 2127 2126 2128 2127 if (!tty) { 2129 2128 local_irq_restore(flags); ··· 2288 2287 struct e100_serial * handle_ser_rx_interrupt_no_dma(struct e100_serial *info) 2289 2288 { 2290 2289 unsigned long data_read; 2291 - struct tty_struct *tty = info->tty; 2290 + struct tty_struct *tty = info->port.tty; 2292 2291 2293 2292 if (!tty) { 2294 2293 printk("!NO TTY!\n"); ··· 2351 2350 data_in, data_read); 2352 2351 char flag = TTY_NORMAL; 2353 2352 if (info->errorcode == ERRCODE_INSERT_BREAK) { 2354 - struct tty_struct *tty = info->tty; 2353 + struct tty_struct *tty = info->port.tty; 2355 2354 tty_insert_flip_char(tty, 0, flag); 2356 2355 info->icount.rx++; 2357 2356 } ··· 2397 2396 goto more_data; 2398 2397 } 2399 2398 2400 - tty_flip_buffer_push(info->tty); 2399 + tty_flip_buffer_push(info->port.tty); 2401 2400 return info; 2402 2401 } 2403 2402 ··· 2548 2547 rstat = info->port[REG_STATUS]; 2549 2548 DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); 2550 2549 e100_disable_serial_tx_ready_irq(info); 2551 - if (info->tty->stopped) 2552 - rs_stop(info->tty); 2550 + if (info->port.tty->stopped) 2551 + rs_stop(info->port.tty); 2553 2552 /* Enable the DMA channel and tell it to continue */ 2554 2553 e100_enable_txdma_channel(info); 2555 2554 /* Wait 12 cycles before doing the DMA command */ ··· 2562 2561 } 2563 2562 /* Normal char-by-char interrupt */ 2564 2563 if (info->xmit.head == info->xmit.tail 2565 - || info->tty->stopped 2566 - || info->tty->hw_stopped) { 2567 - DFLOW(DEBUG_LOG(info->line, "tx_int: stopped %i\n", info->tty->stopped)); 2564 + || info->port.tty->stopped 2565 + || info->port.tty->hw_stopped) { 2566 + DFLOW(DEBUG_LOG(info->line, "tx_int: stopped %i\n", 2567 + info->port.tty->stopped)); 2568 2568 e100_disable_serial_tx_ready_irq(info); 2569 2569 info->tr_running = 0; 2570 2570 return; ··· 2727 2725 2728 2726 info = container_of(work, struct e100_serial, work); 2729 2727 2730 - tty = info->tty; 2728 + tty = info->port.tty; 2731 2729 if (!tty) 2732 2730 return; 2733 2731 ··· 2769 2767 /* Bits and pieces collected from below. Better to have them 2770 2768 in one ifdef:ed clause than to mix in a lot of ifdefs, 2771 2769 right? */ 2772 - if (info->tty) 2773 - clear_bit(TTY_IO_ERROR, &info->tty->flags); 2770 + if (info->port.tty) 2771 + clear_bit(TTY_IO_ERROR, &info->port.tty->flags); 2774 2772 2775 2773 info->xmit.head = info->xmit.tail = 0; 2776 2774 info->first_recv_buffer = info->last_recv_buffer = NULL; ··· 2827 2825 e100_disable_txdma_channel(info); 2828 2826 } 2829 2827 2830 - if (info->tty) 2831 - clear_bit(TTY_IO_ERROR, &info->tty->flags); 2828 + if (info->port.tty) 2829 + clear_bit(TTY_IO_ERROR, &info->port.tty->flags); 2832 2830 2833 2831 info->xmit.head = info->xmit.tail = 0; 2834 2832 info->first_recv_buffer = info->last_recv_buffer = NULL; ··· 2942 2940 descr[i].buf = 0; 2943 2941 } 2944 2942 2945 - if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { 2943 + if (!info->port.tty || (info->port.tty->termios->c_cflag & HUPCL)) { 2946 2944 /* hang up DTR and RTS if HUPCL is enabled */ 2947 2945 e100_dtr(info, 0); 2948 2946 e100_rts(info, 0); /* could check CRTSCTS before doing this */ 2949 2947 } 2950 2948 2951 - if (info->tty) 2952 - set_bit(TTY_IO_ERROR, &info->tty->flags); 2949 + if (info->port.tty) 2950 + set_bit(TTY_IO_ERROR, &info->port.tty->flags); 2953 2951 2954 2952 info->flags &= ~ASYNC_INITIALIZED; 2955 2953 local_irq_restore(flags); ··· 2966 2964 unsigned long flags; 2967 2965 /* first some safety checks */ 2968 2966 2969 - if (!info->tty || !info->tty->termios) 2967 + if (!info->port.tty || !info->port.tty->termios) 2970 2968 return; 2971 2969 if (!info->port) 2972 2970 return; 2973 2971 2974 - cflag = info->tty->termios->c_cflag; 2972 + cflag = info->port.tty->termios->c_cflag; 2975 2973 2976 2974 /* possibly, the tx/rx should be disabled first to do this safely */ 2977 2975 ··· 3099 3097 3100 3098 info->port[REG_TR_CTRL] = info->tx_ctrl; 3101 3099 info->port[REG_REC_CTRL] = info->rx_ctrl; 3102 - xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, STOP_CHAR(info->tty)); 3100 + xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, STOP_CHAR(info->port.tty)); 3103 3101 xoff |= IO_STATE(R_SERIAL0_XOFF, tx_stop, enable); 3104 - if (info->tty->termios->c_iflag & IXON ) { 3105 - DFLOW(DEBUG_LOG(info->line, "FLOW XOFF enabled 0x%02X\n", STOP_CHAR(info->tty))); 3102 + if (info->port.tty->termios->c_iflag & IXON ) { 3103 + DFLOW(DEBUG_LOG(info->line, "FLOW XOFF enabled 0x%02X\n", 3104 + STOP_CHAR(info->port.tty))); 3106 3105 xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); 3107 3106 } 3108 3107 ··· 3478 3475 info->type = new_serial.type; 3479 3476 info->close_delay = new_serial.close_delay; 3480 3477 info->closing_wait = new_serial.closing_wait; 3481 - info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; 3478 + info->port.tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; 3482 3479 3483 3480 check_and_exit: 3484 3481 if (info->flags & ASYNC_INITIALIZED) { ··· 3814 3811 tty_ldisc_flush(tty); 3815 3812 tty->closing = 0; 3816 3813 info->event = 0; 3817 - info->tty = 0; 3814 + info->port.tty = NULL; 3818 3815 if (info->blocked_open) { 3819 3816 if (info->close_delay) 3820 3817 schedule_timeout_interruptible(info->close_delay); ··· 3918 3915 info->event = 0; 3919 3916 info->count = 0; 3920 3917 info->flags &= ~ASYNC_NORMAL_ACTIVE; 3921 - info->tty = 0; 3918 + info->port.tty = NULL; 3922 3919 wake_up_interruptible(&info->open_wait); 3923 3920 } 3924 3921 ··· 4080 4077 4081 4078 info->count++; 4082 4079 tty->driver_data = info; 4083 - info->tty = tty; 4080 + info->port.tty = tty; 4084 4081 4085 - info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; 4082 + info->port.tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; 4086 4083 4087 4084 if (!tmp_buf) { 4088 4085 page = get_zeroed_page(GFP_KERNEL); ··· 4270 4267 (unsigned long)info->max_recv_cnt); 4271 4268 4272 4269 #if 1 4273 - if (info->tty) { 4270 + if (info->port.tty) { 4274 4271 4275 - if (info->tty->stopped) 4272 + if (info->port.tty->stopped) 4276 4273 ret += sprintf(buf+ret, " stopped:%i", 4277 - (int)info->tty->stopped); 4278 - if (info->tty->hw_stopped) 4274 + (int)info->port.tty->stopped); 4275 + if (info->port.tty->hw_stopped) 4279 4276 ret += sprintf(buf+ret, " hw_stopped:%i", 4280 - (int)info->tty->hw_stopped); 4277 + (int)info->port.tty->hw_stopped); 4281 4278 } 4282 4279 4283 4280 { ··· 4468 4465 info->uses_dma_in = 0; 4469 4466 info->uses_dma_out = 0; 4470 4467 info->line = i; 4471 - info->tty = 0; 4468 + info->port.tty = NULL; 4472 4469 info->type = PORT_ETRAX; 4473 4470 info->tr_running = 0; 4474 4471 info->forced_eop = 0;
+2 -2
drivers/serial/dz.c
··· 197 197 while ((status = dz_in(dport, DZ_RBUF)) & DZ_DVAL) { 198 198 dport = &mux->dport[LINE(status)]; 199 199 uport = &dport->port; 200 - tty = uport->info->tty; /* point to the proper dev */ 200 + tty = uport->info->port.tty; /* point to the proper dev */ 201 201 202 202 ch = UCHAR(status); /* grab the char */ 203 203 flag = TTY_NORMAL; ··· 249 249 } 250 250 for (i = 0; i < DZ_NB_PORT; i++) 251 251 if (lines_rx[i]) 252 - tty_flip_buffer_push(mux->dport[i].port.info->tty); 252 + tty_flip_buffer_push(mux->dport[i].port.info->port.tty); 253 253 } 254 254 255 255 /*
+1 -1
drivers/serial/imx.c
··· 372 372 { 373 373 struct imx_port *sport = dev_id; 374 374 unsigned int rx,flg,ignored = 0; 375 - struct tty_struct *tty = sport->port.info->tty; 375 + struct tty_struct *tty = sport->port.info->port.tty; 376 376 unsigned long flags, temp; 377 377 378 378 spin_lock_irqsave(&sport->port.lock,flags);
+11 -10
drivers/serial/ioc4_serial.c
··· 1635 1635 return; 1636 1636 1637 1637 info = the_port->info; 1638 - tty = info->tty; 1638 + tty = info->port.tty; 1639 1639 1640 1640 if (uart_circ_empty(&info->xmit) || uart_tx_stopped(the_port)) { 1641 1641 /* Nothing to do or hw stopped */ ··· 1738 1738 1739 1739 the_port->ignore_status_mask = N_ALL_INPUT; 1740 1740 1741 - info->tty->low_latency = 1; 1741 + info->port.tty->low_latency = 1; 1742 1742 1743 - if (I_IGNPAR(info->tty)) 1743 + if (I_IGNPAR(info->port.tty)) 1744 1744 the_port->ignore_status_mask &= ~(N_PARITY_ERROR 1745 1745 | N_FRAMING_ERROR); 1746 - if (I_IGNBRK(info->tty)) { 1746 + if (I_IGNBRK(info->port.tty)) { 1747 1747 the_port->ignore_status_mask &= ~N_BREAK; 1748 - if (I_IGNPAR(info->tty)) 1748 + if (I_IGNPAR(info->port.tty)) 1749 1749 the_port->ignore_status_mask &= ~N_OVERRUN_ERROR; 1750 1750 } 1751 1751 if (!(cflag & CREAD)) { ··· 1801 1801 ioc4_set_proto(port, the_port->mapbase); 1802 1802 1803 1803 /* set the speed of the serial port */ 1804 - ioc4_change_speed(the_port, info->tty->termios, (struct ktermios *)0); 1804 + ioc4_change_speed(the_port, info->port.tty->termios, 1805 + (struct ktermios *)0); 1805 1806 1806 1807 return 0; 1807 1808 } ··· 2347 2346 /* Make sure all the pointers are "good" ones */ 2348 2347 if (!info) 2349 2348 return; 2350 - if (!info->tty) 2349 + if (!info->port.tty) 2351 2350 return; 2352 2351 2353 2352 spin_lock_irqsave(&the_port->lock, pflags); 2354 - tty = info->tty; 2353 + tty = info->port.tty; 2355 2354 2356 2355 request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS); 2357 2356 ··· 2441 2440 2442 2441 wake_up_interruptible(&info->delta_msr_wait); 2443 2442 2444 - if (info->tty) 2445 - set_bit(TTY_IO_ERROR, &info->tty->flags); 2443 + if (info->port.tty) 2444 + set_bit(TTY_IO_ERROR, &info->port.tty->flags); 2446 2445 2447 2446 spin_lock_irqsave(&the_port->lock, port_flags); 2448 2447 set_notification(port, N_ALL, 0);
+2 -2
drivers/serial/ip22zilog.c
··· 257 257 258 258 tty = NULL; 259 259 if (up->port.info != NULL && 260 - up->port.info->tty != NULL) 261 - tty = up->port.info->tty; 260 + up->port.info->port.tty != NULL) 261 + tty = up->port.info->port.tty; 262 262 263 263 for (;;) { 264 264 ch = readb(&channel->control);
+1 -1
drivers/serial/m32r_sio.c
··· 325 325 326 326 static void receive_chars(struct uart_sio_port *up, int *status) 327 327 { 328 - struct tty_struct *tty = up->port.info->tty; 328 + struct tty_struct *tty = up->port.info->port.tty; 329 329 unsigned char ch; 330 330 unsigned char flag; 331 331 int max_count = 256;
+1 -1
drivers/serial/mcf.c
··· 312 312 uart_insert_char(port, status, MCFUART_USR_RXOVERRUN, ch, flag); 313 313 } 314 314 315 - tty_flip_buffer_push(port->info->tty); 315 + tty_flip_buffer_push(port->info->port.tty); 316 316 } 317 317 318 318 /****************************************************************************/
+16 -16
drivers/serial/mcfserial.c
··· 327 327 static inline void receive_chars(struct mcf_serial *info) 328 328 { 329 329 volatile unsigned char *uartp; 330 - struct tty_struct *tty = info->tty; 330 + struct tty_struct *tty = info->port.tty; 331 331 unsigned char status, ch, flag; 332 332 333 333 if (!tty) ··· 382 382 info->stats.tx++; 383 383 } 384 384 385 - if ((info->xmit_cnt <= 0) || info->tty->stopped) { 385 + if ((info->xmit_cnt <= 0) || info->port.tty->stopped) { 386 386 info->imr &= ~MCFUART_UIR_TXREADY; 387 387 uartp[MCFUART_UIMR] = info->imr; 388 388 return; ··· 428 428 static void mcfrs_offintr(struct work_struct *work) 429 429 { 430 430 struct mcf_serial *info = container_of(work, struct mcf_serial, tqueue); 431 - struct tty_struct *tty = info->tty; 431 + struct tty_struct *tty = info->port.tty; 432 432 433 433 if (tty) 434 434 tty_wakeup(tty); ··· 498 498 static void do_serial_hangup(struct work_struct *work) 499 499 { 500 500 struct mcf_serial *info = container_of(work, struct mcf_serial, tqueue_hangup); 501 - struct tty_struct *tty = info->tty; 501 + struct tty_struct *tty = info->port.tty; 502 502 503 503 if (tty) 504 504 tty_hangup(tty); ··· 532 532 uartp[MCFUART_UCR] = MCFUART_UCR_CMDRESETTX; /* reset TX */ 533 533 mcfrs_setsignals(info, 1, 1); 534 534 535 - if (info->tty) 536 - clear_bit(TTY_IO_ERROR, &info->tty->flags); 535 + if (info->port.tty) 536 + clear_bit(TTY_IO_ERROR, &info->port.tty->flags); 537 537 info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; 538 538 539 539 /* ··· 578 578 uartp[MCFUART_UCR] = MCFUART_UCR_CMDRESETRX; /* reset RX */ 579 579 uartp[MCFUART_UCR] = MCFUART_UCR_CMDRESETTX; /* reset TX */ 580 580 581 - if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) 581 + if (!info->port.tty || (info->port.tty->termios->c_cflag & HUPCL)) 582 582 mcfrs_setsignals(info, 0, 0); 583 583 584 584 if (info->xmit_buf) { ··· 586 586 info->xmit_buf = 0; 587 587 } 588 588 589 - if (info->tty) 590 - set_bit(TTY_IO_ERROR, &info->tty->flags); 589 + if (info->port.tty) 590 + set_bit(TTY_IO_ERROR, &info->port.tty->flags); 591 591 592 592 info->flags &= ~ASYNC_INITIALIZED; 593 593 local_irq_restore(flags); ··· 609 609 unsigned int fraction; 610 610 #endif 611 611 612 - if (!info->tty || !info->tty->termios) 612 + if (!info->port.tty || !info->port.tty->termios) 613 613 return; 614 - cflag = info->tty->termios->c_cflag; 614 + cflag = info->port.tty->termios->c_cflag; 615 615 if (info->addr == 0) 616 616 return; 617 617 ··· 623 623 if (i & CBAUDEX) { 624 624 i &= ~CBAUDEX; 625 625 if (i < 1 || i > 4) 626 - info->tty->termios->c_cflag &= ~CBAUDEX; 626 + info->port.tty->termios->c_cflag &= ~CBAUDEX; 627 627 else 628 628 i += 15; 629 629 } ··· 1216 1216 1217 1217 tty->closing = 0; 1218 1218 info->event = 0; 1219 - info->tty = 0; 1219 + info->port.tty = NULL; 1220 1220 #if 0 1221 1221 if (tty->ldisc.num != ldiscs[N_TTY].num) { 1222 1222 if (tty->ldisc.close) ··· 1325 1325 info->event = 0; 1326 1326 info->count = 0; 1327 1327 info->flags &= ~ASYNC_NORMAL_ACTIVE; 1328 - info->tty = 0; 1328 + info->port.tty = NULL; 1329 1329 wake_up_interruptible(&info->open_wait); 1330 1330 } 1331 1331 ··· 1452 1452 #endif 1453 1453 info->count++; 1454 1454 tty->driver_data = info; 1455 - info->tty = tty; 1455 + info->port.tty = tty; 1456 1456 1457 1457 /* 1458 1458 * Start up serial port ··· 1767 1767 for (i = 0, info = mcfrs_table; (i < NR_PORTS); i++, info++) { 1768 1768 info->magic = SERIAL_MAGIC; 1769 1769 info->line = i; 1770 - info->tty = 0; 1770 + info->port.tty = NULL; 1771 1771 info->custom_divisor = 16; 1772 1772 info->close_delay = 50; 1773 1773 info->closing_wait = 3000;
+1 -1
drivers/serial/mpc52xx_uart.c
··· 732 732 static inline int 733 733 mpc52xx_uart_int_rx_chars(struct uart_port *port) 734 734 { 735 - struct tty_struct *tty = port->info->tty; 735 + struct tty_struct *tty = port->info->port.tty; 736 736 unsigned char ch, flag; 737 737 unsigned short status; 738 738
+1 -1
drivers/serial/mpsc.c
··· 932 932 static int mpsc_rx_intr(struct mpsc_port_info *pi) 933 933 { 934 934 struct mpsc_rx_desc *rxre; 935 - struct tty_struct *tty = pi->port.info->tty; 935 + struct tty_struct *tty = pi->port.info->port.tty; 936 936 u32 cmdstat, bytes_in, i; 937 937 int rc = 0; 938 938 u8 *bp;
+1 -1
drivers/serial/mux.c
··· 243 243 static void mux_read(struct uart_port *port) 244 244 { 245 245 int data; 246 - struct tty_struct *tty = port->info->tty; 246 + struct tty_struct *tty = port->info->port.tty; 247 247 __u32 start_count = port->icount.rx; 248 248 249 249 while(1) {
+1 -1
drivers/serial/netx-serial.c
··· 203 203 static void netx_rxint(struct uart_port *port) 204 204 { 205 205 unsigned char rx, flg, status; 206 - struct tty_struct *tty = port->info->tty; 206 + struct tty_struct *tty = port->info->port.tty; 207 207 208 208 while (!(readl(port->membase + UART_FR) & FR_RXFE)) { 209 209 rx = readl(port->membase + UART_DR);
+1 -1
drivers/serial/pnx8xxx_uart.c
··· 181 181 182 182 static void pnx8xxx_rx_chars(struct pnx8xxx_port *sport) 183 183 { 184 - struct tty_struct *tty = sport->port.info->tty; 184 + struct tty_struct *tty = sport->port.info->port.tty; 185 185 unsigned int status, ch, flg; 186 186 187 187 status = FIFO_TO_SM(serial_in(sport, PNX8XXX_FIFO)) |
+1 -1
drivers/serial/pxa.c
··· 101 101 102 102 static inline void receive_chars(struct uart_pxa_port *up, int *status) 103 103 { 104 - struct tty_struct *tty = up->port.info->tty; 104 + struct tty_struct *tty = up->port.info->port.tty; 105 105 unsigned int ch, flag; 106 106 int max_count = 256; 107 107
+1 -1
drivers/serial/sa1100.c
··· 189 189 static void 190 190 sa1100_rx_chars(struct sa1100_port *sport) 191 191 { 192 - struct tty_struct *tty = sport->port.info->tty; 192 + struct tty_struct *tty = sport->port.info->port.tty; 193 193 unsigned int status, ch, flg; 194 194 195 195 status = UTSR1_TO_SM(UART_GET_UTSR1(sport)) |
+1 -1
drivers/serial/sb1250-duart.c
··· 384 384 uart_insert_char(uport, status, M_DUART_OVRUN_ERR, ch, flag); 385 385 } 386 386 387 - tty_flip_buffer_push(uport->info->tty); 387 + tty_flip_buffer_push(uport->info->port.tty); 388 388 } 389 389 390 390 static void sbd_transmit_chars(struct sbd_port *sport)
+1 -1
drivers/serial/sc26xx.c
··· 141 141 u8 status; 142 142 143 143 if (port->info != NULL) /* Unopened serial console */ 144 - tty = port->info->tty; 144 + tty = port->info->port.tty; 145 145 146 146 while (limit-- > 0) { 147 147 status = READ_SC_PORT(port, SR);
+1 -1
drivers/serial/serial_ks8695.c
··· 108 108 static irqreturn_t ks8695uart_rx_chars(int irq, void *dev_id) 109 109 { 110 110 struct uart_port *port = dev_id; 111 - struct tty_struct *tty = port->info->tty; 111 + struct tty_struct *tty = port->info->port.tty; 112 112 unsigned int status, ch, lsr, flg, max_count = 256; 113 113 114 114 status = UART_GET_LSR(port); /* clears pending LSR interrupts */
+1 -1
drivers/serial/serial_lh7a40x.c
··· 137 137 138 138 static void lh7a40xuart_rx_chars (struct uart_port* port) 139 139 { 140 - struct tty_struct* tty = port->info->tty; 140 + struct tty_struct* tty = port->info->port.tty; 141 141 int cbRxMax = 256; /* (Gross) limit on receive */ 142 142 unsigned int data; /* Received data and status */ 143 143 unsigned int flag;
+4 -4
drivers/serial/sh-sci.c
··· 521 521 static inline void sci_receive_chars(struct uart_port *port) 522 522 { 523 523 struct sci_port *sci_port = (struct sci_port *)port; 524 - struct tty_struct *tty = port->info->tty; 524 + struct tty_struct *tty = port->info->port.tty; 525 525 int i, count, copied = 0; 526 526 unsigned short status; 527 527 unsigned char flag; ··· 642 642 { 643 643 int copied = 0; 644 644 unsigned short status = sci_in(port, SCxSR); 645 - struct tty_struct *tty = port->info->tty; 645 + struct tty_struct *tty = port->info->port.tty; 646 646 647 647 if (status & SCxSR_ORER(port)) { 648 648 /* overrun error */ ··· 692 692 { 693 693 int copied = 0; 694 694 unsigned short status = sci_in(port, SCxSR); 695 - struct tty_struct *tty = port->info->tty; 695 + struct tty_struct *tty = port->info->port.tty; 696 696 struct sci_port *s = &sci_ports[port->line]; 697 697 698 698 if (uart_handle_break(port)) ··· 762 762 } else { 763 763 #if defined(SCIF_ORER) 764 764 if((sci_in(port, SCLSR) & SCIF_ORER) != 0) { 765 - struct tty_struct *tty = port->info->tty; 765 + struct tty_struct *tty = port->info->port.tty; 766 766 767 767 sci_out(port, SCLSR, 0); 768 768 tty_insert_flip_char(tty, 0, TTY_OVERRUN);
+2 -2
drivers/serial/uartlite.c
··· 75 75 76 76 static int ulite_receive(struct uart_port *port, int stat) 77 77 { 78 - struct tty_struct *tty = port->info->tty; 78 + struct tty_struct *tty = port->info->port.tty; 79 79 unsigned char ch = 0; 80 80 char flag = TTY_NORMAL; 81 81 ··· 162 162 busy |= ulite_transmit(port, stat); 163 163 } while (busy); 164 164 165 - tty_flip_buffer_push(port->info->tty); 165 + tty_flip_buffer_push(port->info->port.tty); 166 166 167 167 return IRQ_HANDLED; 168 168 }
+1 -1
drivers/serial/ucc_uart.c
··· 466 466 int i; 467 467 unsigned char ch, *cp; 468 468 struct uart_port *port = &qe_port->port; 469 - struct tty_struct *tty = port->info->tty; 469 + struct tty_struct *tty = port->info->port.tty; 470 470 struct qe_bd *bdp; 471 471 u16 status; 472 472 unsigned int flg;
+2 -2
drivers/serial/v850e_uart.c
··· 300 300 301 301 port->icount.rx++; 302 302 303 - tty_insert_flip_char (port->info->tty, ch, ch_stat); 304 - tty_schedule_flip (port->info->tty); 303 + tty_insert_flip_char (port->info->port.tty, ch, ch_stat); 304 + tty_schedule_flip (port->info->port.tty); 305 305 306 306 return IRQ_HANDLED; 307 307 }
+1 -1
drivers/serial/vr41xx_siu.c
··· 318 318 char flag; 319 319 int max_count = RX_MAX_COUNT; 320 320 321 - tty = port->info->tty; 321 + tty = port->info->port.tty; 322 322 lsr = *status; 323 323 324 324 do {
+1 -1
drivers/serial/zs.c
··· 602 602 uart_insert_char(uport, status, Rx_OVR, ch, flag); 603 603 } 604 604 605 - tty_flip_buffer_push(uport->info->tty); 605 + tty_flip_buffer_push(uport->info->port.tty); 606 606 } 607 607 608 608 static void zs_raw_transmit_chars(struct zs_port *zport)