aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/bfin_sport_uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/bfin_sport_uart.c')
-rw-r--r--drivers/tty/serial/bfin_sport_uart.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/tty/serial/bfin_sport_uart.c b/drivers/tty/serial/bfin_sport_uart.c
index f5d117379b60..e4d3ac2e8992 100644
--- a/drivers/tty/serial/bfin_sport_uart.c
+++ b/drivers/tty/serial/bfin_sport_uart.c
@@ -149,7 +149,8 @@ static int sport_uart_setup(struct sport_uart_port *up, int size, int baud_rate)
149static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id) 149static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id)
150{ 150{
151 struct sport_uart_port *up = dev_id; 151 struct sport_uart_port *up = dev_id;
152 struct tty_struct *tty = up->port.state->port.tty; 152 struct tty_port *port = &up->port.state->port;
153 struct tty_struct *tty = tport->tty;
153 unsigned int ch; 154 unsigned int ch;
154 155
155 spin_lock(&up->port.lock); 156 spin_lock(&up->port.lock);
@@ -159,7 +160,7 @@ static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id)
159 up->port.icount.rx++; 160 up->port.icount.rx++;
160 161
161 if (!uart_handle_sysrq_char(&up->port, ch)) 162 if (!uart_handle_sysrq_char(&up->port, ch))
162 tty_insert_flip_char(tty, ch, TTY_NORMAL); 163 tty_insert_flip_char(port, ch, TTY_NORMAL);
163 } 164 }
164 tty_flip_buffer_push(tty); 165 tty_flip_buffer_push(tty);
165 166
@@ -182,7 +183,6 @@ static irqreturn_t sport_uart_tx_irq(int irq, void *dev_id)
182static irqreturn_t sport_uart_err_irq(int irq, void *dev_id) 183static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
183{ 184{
184 struct sport_uart_port *up = dev_id; 185 struct sport_uart_port *up = dev_id;
185 struct tty_struct *tty = up->port.state->port.tty;
186 unsigned int stat = SPORT_GET_STAT(up); 186 unsigned int stat = SPORT_GET_STAT(up);
187 187
188 spin_lock(&up->port.lock); 188 spin_lock(&up->port.lock);
@@ -190,7 +190,7 @@ static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
190 /* Overflow in RX FIFO */ 190 /* Overflow in RX FIFO */
191 if (stat & ROVF) { 191 if (stat & ROVF) {
192 up->port.icount.overrun++; 192 up->port.icount.overrun++;
193 tty_insert_flip_char(tty, 0, TTY_OVERRUN); 193 tty_insert_flip_char(&up->port.state->port, 0, TTY_OVERRUN);
194 SPORT_PUT_STAT(up, ROVF); /* Clear ROVF bit */ 194 SPORT_PUT_STAT(up, ROVF); /* Clear ROVF bit */
195 } 195 }
196 /* These should not happen */ 196 /* These should not happen */
@@ -205,6 +205,8 @@ static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
205 SSYNC(); 205 SSYNC();
206 206
207 spin_unlock(&up->port.lock); 207 spin_unlock(&up->port.lock);
208 /* XXX we don't push the overrun bit to TTY? */
209
208 return IRQ_HANDLED; 210 return IRQ_HANDLED;
209} 211}
210 212