]> Pileus Git - ~andy/linux/blobdiff - drivers/serial/bfin_5xx.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
[~andy/linux] / drivers / serial / bfin_5xx.c
index 96f7e7484feebf4269c631862f9a01b227eac0f6..511cbf68787782ce9b782f85ae51a0b5a80df5a6 100644 (file)
@@ -797,7 +797,7 @@ static void bfin_serial_shutdown(struct uart_port *port)
                gpio_free(uart->rts_pin);
 #endif
 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
-       if (UART_GET_IER(uart) && EDSSI)
+       if (UART_GET_IER(uart) & EDSSI)
                free_irq(uart->status_irq, uart);
 #endif
 }
@@ -869,7 +869,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
        }
 
        baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
-       quot = uart_get_divisor(port, baud) - ANOMALY_05000230;
+       quot = uart_get_divisor(port, baud);
+
+       /* If discipline is not IRDA, apply ANOMALY_05000230 */
+       if (termios->c_line != N_IRDA)
+               quot -= ANOMALY_05000230;
+
        spin_lock_irqsave(&uart->port.lock, flags);
 
        UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);