From: Stefan Wahren Date: Wed, 10 May 2017 08:53:27 +0000 (+0200) Subject: tty: serdev-ttyport: return actual baudrate from ttyport_set_baudrate X-Git-Tag: v4.13-rc1~183^2~61 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=56c607b509587e67e5f53587fdb05698ef85e278;p=karo-tx-linux.git tty: serdev-ttyport: return actual baudrate from ttyport_set_baudrate Instead of returning the requested baudrate, we better return the actual one because it isn't always the same. Signed-off-by: Stefan Wahren Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c index 487c88f6aa0e..2cfdf34101f1 100644 --- a/drivers/tty/serdev/serdev-ttyport.c +++ b/drivers/tty/serdev/serdev-ttyport.c @@ -151,7 +151,7 @@ static unsigned int ttyport_set_baudrate(struct serdev_controller *ctrl, unsigne /* tty_set_termios() return not checked as it is always 0 */ tty_set_termios(tty, &ktermios); - return speed; + return ktermios.c_ospeed; } static void ttyport_set_flow_control(struct serdev_controller *ctrl, bool enable)