[PATCH] jsm: fixing termios structure to be compatible with stty application

From: leitao
Date: Wed Sep 30 2009 - 12:19:50 EST


Currently stty returns "unable to perform all requested operations",
when it changes the speed of a jsm device.
It was happening because c_ispeed and c_ospeed were not set properly.
This patch just set them, so that when stty compare the requested
and the new mode(struct termios), they are the same.

Signed-off-by: Breno LeitÃo <leitao@xxxxxxxxxxxxxxxxxx>
---
drivers/serial/jsm/jsm_tty.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c
index 00f4577..dd1ed76 100644
--- a/drivers/serial/jsm/jsm_tty.c
+++ b/drivers/serial/jsm/jsm_tty.c
@@ -321,6 +321,10 @@ static void jsm_tty_set_termios(struct uart_port *port,

channel->ch_bd->bd_ops->param(channel);
jsm_carrier(channel);
+
+ termios->c_ispeed = termios->c_cflag & CBAUD;
+ termios->c_ospeed = termios->c_cflag & CBAUD;
+
spin_unlock_irqrestore(&port->lock, lock_flags);
}

--
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/