diff options
author | Alan Cox <alan@linux.intel.com> | 2013-01-25 19:05:30 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 20:09:38 +0400 |
commit | ebcf09816c68d1082aec5a2646e9f20715384502 (patch) | |
tree | 875327d275fbcc39c1cd200220bc43a410b87936 /drivers/tty/goldfish.c | |
parent | eb51d917a7e6b7d5ce1a58941f4a5840ac06553a (diff) | |
download | linux-ebcf09816c68d1082aec5a2646e9f20715384502.tar.xz |
goldfish: move to tty_port for flip buffers
Sorry forgot to merge this in the original submission. Resync
with the tty tree changes moving the buffers into the tty_port
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/goldfish.c')
-rw-r--r-- | drivers/tty/goldfish.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c index e2ccb6daa6c5..f17d2e4ee2ca 100644 --- a/drivers/tty/goldfish.c +++ b/drivers/tty/goldfish.c @@ -72,23 +72,18 @@ static irqreturn_t goldfish_tty_interrupt(int irq, void *dev_id) unsigned long irq_flags; unsigned char *buf; u32 count; - struct tty_struct *tty; count = readl(base + GOLDFISH_TTY_BYTES_READY); if(count == 0) return IRQ_NONE; - tty = tty_port_tty_get(&qtty->port); - if (tty) { - count = tty_prepare_flip_string(tty, &buf, count); - spin_lock_irqsave(&qtty->lock, irq_flags); - writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR); - writel(count, base + GOLDFISH_TTY_DATA_LEN); - writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD); - spin_unlock_irqrestore(&qtty->lock, irq_flags); - tty_schedule_flip(tty); - tty_kref_put(tty); - } + count = tty_prepare_flip_string(&qtty->port, &buf, count); + spin_lock_irqsave(&qtty->lock, irq_flags); + writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR); + writel(count, base + GOLDFISH_TTY_DATA_LEN); + writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD); + spin_unlock_irqrestore(&qtty->lock, irq_flags); + tty_schedule_flip(&qtty->port); return IRQ_HANDLED; } |