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