Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alan Cox and committed by
Greg Kroah-Hartman
ebcf0981 eb51d917

+7 -12
+7 -12
drivers/tty/goldfish.c
··· 72 72 unsigned long irq_flags; 73 73 unsigned char *buf; 74 74 u32 count; 75 - struct tty_struct *tty; 76 75 77 76 count = readl(base + GOLDFISH_TTY_BYTES_READY); 78 77 if(count == 0) 79 78 return IRQ_NONE; 80 79 81 - tty = tty_port_tty_get(&qtty->port); 82 - if (tty) { 83 - count = tty_prepare_flip_string(tty, &buf, count); 84 - spin_lock_irqsave(&qtty->lock, irq_flags); 85 - writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR); 86 - writel(count, base + GOLDFISH_TTY_DATA_LEN); 87 - writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD); 88 - spin_unlock_irqrestore(&qtty->lock, irq_flags); 89 - tty_schedule_flip(tty); 90 - tty_kref_put(tty); 91 - } 80 + count = tty_prepare_flip_string(&qtty->port, &buf, count); 81 + spin_lock_irqsave(&qtty->lock, irq_flags); 82 + writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR); 83 + writel(count, base + GOLDFISH_TTY_DATA_LEN); 84 + writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD); 85 + spin_unlock_irqrestore(&qtty->lock, irq_flags); 86 + tty_schedule_flip(&qtty->port); 92 87 return IRQ_HANDLED; 93 88 } 94 89