summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serdev
diff options
context:
space:
mode:
authorStefan Wahren <stefan.wahren@i2se.com>2017-05-10 10:53:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-18 16:19:16 +0200
commit56c607b509587e67e5f53587fdb05698ef85e278 (patch)
treeb0643426be1a47df49785c79a0fb62dcb2805740 /drivers/tty/serdev
parentserial: sh-sci: Move uart_register_driver call to device probe (diff)
downloadlinux-56c607b509587e67e5f53587fdb05698ef85e278.tar.xz
linux-56c607b509587e67e5f53587fdb05698ef85e278.zip
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 <stefan.wahren@i2se.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serdev')
-rw-r--r--drivers/tty/serdev/serdev-ttyport.c2
1 files changed, 1 insertions, 1 deletions
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)