Message ID | 20200221064127.16848-2-shrirang.bagul@canonical.com |
---|---|
State | New |
Headers | show |
Series | Support Intel Atom (Baytrail-I) HS-UART serdev slaves over tty | expand |
diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c index 247788a16f0b..f892fbe08208 100644 --- a/drivers/tty/serdev/serdev-ttyport.c +++ b/drivers/tty/serdev/serdev-ttyport.c @@ -122,6 +122,8 @@ static int ttyport_open(struct serdev_controller *ctrl) if (ret) goto err_close; + tty_unlock(serport->tty); + /* Bring the UART into a known 8 bits no parity hw fc state */ ktermios = tty->termios; ktermios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | @@ -135,7 +137,6 @@ static int ttyport_open(struct serdev_controller *ctrl) set_bit(SERPORT_ACTIVE, &serport->flags); - tty_unlock(serport->tty); return 0; err_close: