diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-10-01 02:27:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:20 -0400 |
commit | c7bce3097c0f9bbed76ee6fd03742f2624031a45 (patch) | |
tree | 6a9690926d5afd84545ca364dd3ca173d9aca1eb /drivers/char/mxser.c | |
parent | 00988a3514bbc0cce781c067cf52559741d88b80 (diff) |
[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 <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r-- | drivers/char/mxser.c | 66 |
1 files changed, 1 insertions, 65 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 556abd3e0d07..27a653772049 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 | |||
2554 | #define B921600 (B460800 +1) | 2554 | #define B921600 (B460800 +1) |
2555 | #endif | 2555 | #endif |
2556 | if (mxser_set_baud_method[info->port] == 0) { | 2556 | if (mxser_set_baud_method[info->port] == 0) { |
2557 | switch (cflag & (CBAUD | CBAUDEX)) { | 2557 | baud = tty_get_baud_rate(info->tty); |
2558 | case B921600: | ||
2559 | baud = 921600; | ||
2560 | break; | ||
2561 | case B460800: | ||
2562 | baud = 460800; | ||
2563 | break; | ||
2564 | case B230400: | ||
2565 | baud = 230400; | ||
2566 | break; | ||
2567 | case B115200: | ||
2568 | baud = 115200; | ||
2569 | break; | ||
2570 | case B57600: | ||
2571 | baud = 57600; | ||
2572 | break; | ||
2573 | case B38400: | ||
2574 | baud = 38400; | ||
2575 | break; | ||
2576 | case B19200: | ||
2577 | baud = 19200; | ||
2578 | break; | ||
2579 | case B9600: | ||
2580 | baud = 9600; | ||
2581 | break; | ||
2582 | case B4800: | ||
2583 | baud = 4800; | ||
2584 | break; | ||
2585 | case B2400: | ||
2586 | baud = 2400; | ||
2587 | break; | ||
2588 | case B1800: | ||
2589 | baud = 1800; | ||
2590 | break; | ||
2591 | case B1200: | ||
2592 | baud = 1200; | ||
2593 | break; | ||
2594 | case B600: | ||
2595 | baud = 600; | ||
2596 | break; | ||
2597 | case B300: | ||
2598 | baud = 300; | ||
2599 | break; | ||
2600 | case B200: | ||
2601 | baud = 200; | ||
2602 | break; | ||
2603 | case B150: | ||
2604 | baud = 150; | ||
2605 | break; | ||
2606 | case B134: | ||
2607 | baud = 134; | ||
2608 | break; | ||
2609 | case B110: | ||
2610 | baud = 110; | ||
2611 | break; | ||
2612 | case B75: | ||
2613 | baud = 75; | ||
2614 | break; | ||
2615 | case B50: | ||
2616 | baud = 50; | ||
2617 | break; | ||
2618 | default: | ||
2619 | baud = 0; | ||
2620 | break; | ||
2621 | } | ||
2622 | mxser_set_baud(info, baud); | 2558 | mxser_set_baud(info, baud); |
2623 | } | 2559 | } |
2624 | 2560 | ||