Skip to content

Commit 6ada606

Browse files
andy-shevgregkh
authored andcommitted
tty: baudrate: Synchronise baud_table[] and baud_bits[]
Synchronize baud rate tables baud_table and baud_bits with each other for better readability. This makes clear what is being used for SPARC. No functional change intended. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8412ba1 commit 6ada606

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

drivers/tty/tty_baudrate.c

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* include/asm/termbits.h file.
1818
*/
1919
static const speed_t baud_table[] = {
20-
0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
21-
9600, 19200, 38400, 57600, 115200, 230400, 460800,
20+
0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400,
21+
4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800,
2222
#ifdef __sparc__
2323
76800, 153600, 307200, 614400, 921600
2424
#else
@@ -27,22 +27,16 @@ static const speed_t baud_table[] = {
2727
#endif
2828
};
2929

30-
#ifndef __sparc__
3130
static const tcflag_t baud_bits[] = {
32-
B0, B50, B75, B110, B134, B150, B200, B300, B600,
33-
B1200, B1800, B2400, B4800, B9600, B19200, B38400,
34-
B57600, B115200, B230400, B460800, B500000, B576000,
35-
B921600, B1000000, B1152000, B1500000, B2000000, B2500000,
36-
B3000000, B3500000, B4000000
37-
};
31+
B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400,
32+
B4800, B9600, B19200, B38400, B57600, B115200, B230400, B460800,
33+
#ifdef __sparc__
34+
B76800, B153600, B307200, B614400, B921600
3835
#else
39-
static const tcflag_t baud_bits[] = {
40-
B0, B50, B75, B110, B134, B150, B200, B300, B600,
41-
B1200, B1800, B2400, B4800, B9600, B19200, B38400,
42-
B57600, B115200, B230400, B460800, B76800, B153600,
43-
B307200, B614400, B921600
44-
};
36+
B500000, B576000, B921600, B1000000, B1152000, B1500000, B2000000,
37+
B2500000, B3000000, B3500000, B4000000
4538
#endif
39+
};
4640

4741
static int n_baud_table = ARRAY_SIZE(baud_table);
4842

0 commit comments

Comments
 (0)