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>
This commit is contained in:
parent
eb51d917a7
commit
ebcf09816c
|
@ -72,23 +72,18 @@ static irqreturn_t goldfish_tty_interrupt(int irq, void *dev_id)
|
||||||
unsigned long irq_flags;
|
unsigned long irq_flags;
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
u32 count;
|
u32 count;
|
||||||
struct tty_struct *tty;
|
|
||||||
|
|
||||||
count = readl(base + GOLDFISH_TTY_BYTES_READY);
|
count = readl(base + GOLDFISH_TTY_BYTES_READY);
|
||||||
if(count == 0)
|
if(count == 0)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
|
|
||||||
tty = tty_port_tty_get(&qtty->port);
|
count = tty_prepare_flip_string(&qtty->port, &buf, count);
|
||||||
if (tty) {
|
spin_lock_irqsave(&qtty->lock, irq_flags);
|
||||||
count = tty_prepare_flip_string(tty, &buf, count);
|
writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR);
|
||||||
spin_lock_irqsave(&qtty->lock, irq_flags);
|
writel(count, base + GOLDFISH_TTY_DATA_LEN);
|
||||||
writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR);
|
writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD);
|
||||||
writel(count, base + GOLDFISH_TTY_DATA_LEN);
|
spin_unlock_irqrestore(&qtty->lock, irq_flags);
|
||||||
writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD);
|
tty_schedule_flip(&qtty->port);
|
||||||
spin_unlock_irqrestore(&qtty->lock, irq_flags);
|
|
||||||
tty_schedule_flip(tty);
|
|
||||||
tty_kref_put(tty);
|
|
||||||
}
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue