]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/serial/imx.c
lib/decompress_bunzip2.c: fix checkstack warning
[karo-tx-linux.git] / drivers / serial / imx.c
index eacb588a93459911e2d3d5be0a7af7f171dc24ec..66ecc7ab6daba803c5c74f8fa06a6a6b105b8f8c 100644 (file)
@@ -909,13 +909,11 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
        rational_best_approximation(16 * div * baud, sport->port.uartclk,
                1 << 16, 1 << 16, &num, &denom);
 
-       if (port->state && port->state->port.tty) {
-               tdiv64 = sport->port.uartclk;
-               tdiv64 *= num;
-               do_div(tdiv64, denom * 16 * div);
-               tty_encode_baud_rate(sport->port.state->port.tty,
+       tdiv64 = sport->port.uartclk;
+       tdiv64 *= num;
+       do_div(tdiv64, denom * 16 * div);
+       tty_termios_encode_baud_rate(termios,
                                (speed_t)tdiv64, (speed_t)tdiv64);
-       }
 
        num -= 1;
        denom -= 1;