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