From c7bce3097c0f9bbed76ee6fd03742f2624031a45 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 30 Sep 2006 23:27:24 -0700 Subject: [PATCH] serial: Fix up offenders peering at baud bits directly Stop some other people peering into the baud bits on their own and make them use the tty_get_baud_rate() helper as a preperation for the move to the new termios. Corrected dependancy previous one had on new termios structs Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/mxser.c | 66 +--------------------------------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) (limited to 'drivers/char/mxser.c') diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 556abd3e0d0..27a65377204 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -2554,71 +2554,7 @@ static int mxser_change_speed(struct mxser_struct *info, struct termios *old_ter #define B921600 (B460800 +1) #endif if (mxser_set_baud_method[info->port] == 0) { - switch (cflag & (CBAUD | CBAUDEX)) { - case B921600: - baud = 921600; - break; - case B460800: - baud = 460800; - break; - case B230400: - baud = 230400; - break; - case B115200: - baud = 115200; - break; - case B57600: - baud = 57600; - break; - case B38400: - baud = 38400; - break; - case B19200: - baud = 19200; - break; - case B9600: - baud = 9600; - break; - case B4800: - baud = 4800; - break; - case B2400: - baud = 2400; - break; - case B1800: - baud = 1800; - break; - case B1200: - baud = 1200; - break; - case B600: - baud = 600; - break; - case B300: - baud = 300; - break; - case B200: - baud = 200; - break; - case B150: - baud = 150; - break; - case B134: - baud = 134; - break; - case B110: - baud = 110; - break; - case B75: - baud = 75; - break; - case B50: - baud = 50; - break; - default: - baud = 0; - break; - } + baud = tty_get_baud_rate(info->tty); mxser_set_baud(info, baud); } -- cgit v1.2.3