Commit ebcf09816c68d1082aec5a2646e9f20715384502
Committed by
Greg Kroah-Hartman
1 parent
eb51d917a7
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 7 additions and 12 deletions Side-by-side Diff
drivers/tty/goldfish.c
... | ... | @@ -72,23 +72,18 @@ |
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 |