diff options
author | Alan Cox <alan@linux.intel.com> | 2013-01-25 10:05:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 11:09:38 -0500 |
commit | ebcf09816c68d1082aec5a2646e9f20715384502 (patch) | |
tree | 875327d275fbcc39c1cd200220bc43a410b87936 /drivers/tty | |
parent | eb51d917a7e6b7d5ce1a58941f4a5840ac06553a (diff) |
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')
-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) | |||
72 | unsigned long irq_flags; | 72 | unsigned long irq_flags; |
73 | unsigned char *buf; | 73 | unsigned char *buf; |
74 | u32 count; | 74 | u32 count; |
75 | struct tty_struct *tty; | ||
76 | 75 | ||
77 | count = readl(base + GOLDFISH_TTY_BYTES_READY); | 76 | count = readl(base + GOLDFISH_TTY_BYTES_READY); |
78 | if(count == 0) | 77 | if(count == 0) |
79 | return IRQ_NONE; | 78 | return IRQ_NONE; |
80 | 79 | ||
81 | tty = tty_port_tty_get(&qtty->port); | 80 | count = tty_prepare_flip_string(&qtty->port, &buf, count); |
82 | if (tty) { | 81 | spin_lock_irqsave(&qtty->lock, irq_flags); |
83 | count = tty_prepare_flip_string(tty, &buf, count); | 82 | writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR); |
84 | spin_lock_irqsave(&qtty->lock, irq_flags); | 83 | writel(count, base + GOLDFISH_TTY_DATA_LEN); |
85 | writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR); | 84 | writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD); |
86 | writel(count, base + GOLDFISH_TTY_DATA_LEN); | 85 | spin_unlock_irqrestore(&qtty->lock, irq_flags); |
87 | writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD); | 86 | tty_schedule_flip(&qtty->port); |
88 | spin_unlock_irqrestore(&qtty->lock, irq_flags); | ||
89 | tty_schedule_flip(tty); | ||
90 | tty_kref_put(tty); | ||
91 | } | ||
92 | return IRQ_HANDLED; | 87 | return IRQ_HANDLED; |
93 | } | 88 | } |
94 | 89 | ||