diff options
Diffstat (limited to 'drivers/serial/68360serial.c')
-rw-r--r-- | drivers/serial/68360serial.c | 52 |
1 files changed, 26 insertions, 26 deletions
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); |