diff options
Diffstat (limited to 'arch/alpha/kernel/srmcons.c')
-rw-r--r-- | arch/alpha/kernel/srmcons.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 21b57a66e809..6f01d9ad7b81 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c @@ -44,9 +44,8 @@ typedef union _srmcons_result { /* called with callback_lock held */ static int -srmcons_do_receive_chars(struct tty_struct *tty) +srmcons_do_receive_chars(struct tty_port *port) { - struct tty_port *port = tty->port; srmcons_result result; int count = 0, loops = 0; @@ -59,7 +58,7 @@ srmcons_do_receive_chars(struct tty_struct *tty) } while((result.bits.status & 1) && (++loops < 10)); if (count) - tty_schedule_flip(tty); + tty_schedule_flip(port); return count; } @@ -74,7 +73,7 @@ srmcons_receive_chars(unsigned long data) local_irq_save(flags); if (spin_trylock(&srmcons_callback_lock)) { - if (!srmcons_do_receive_chars(port->tty)) + if (!srmcons_do_receive_chars(port)) incr = 100; spin_unlock(&srmcons_callback_lock); } @@ -89,7 +88,7 @@ srmcons_receive_chars(unsigned long data) /* called with callback_lock held */ static int -srmcons_do_write(struct tty_struct *tty, const char *buf, int count) +srmcons_do_write(struct tty_port *port, const char *buf, int count) { static char str_cr[1] = "\r"; long c, remaining = count; @@ -114,10 +113,10 @@ srmcons_do_write(struct tty_struct *tty, const char *buf, int count) cur += result.bits.c; /* - * Check for pending input iff a tty was provided + * Check for pending input iff a tty port was provided */ - if (tty) - srmcons_do_receive_chars(tty); + if (port) + srmcons_do_receive_chars(port); } while (need_cr) { @@ -136,7 +135,7 @@ srmcons_write(struct tty_struct *tty, unsigned long flags; spin_lock_irqsave(&srmcons_callback_lock, flags); - srmcons_do_write(tty, (const char *) buf, count); + srmcons_do_write(tty->port, (const char *) buf, count); spin_unlock_irqrestore(&srmcons_callback_lock, flags); return count; |