diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-06-24 14:48:22 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-24 14:48:22 -0400 |
commit | 0a8b80c52f44a6e84206618a8a450ba13a5809dc (patch) | |
tree | 0ac9a71b3820e6d5876266aa50fa55abcfc5bf5d /drivers/serial/8250.c | |
parent | 59a49e38711a146dc0bef4837c825b5422335460 (diff) |
[PATCH] Serial: Eliminate magic numbers
Use the existing macros instead.
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r-- | drivers/serial/8250.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 79f67fd863e..d8b9d2b8c20 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -1682,22 +1682,22 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios, | |||
1682 | 1682 | ||
1683 | switch (termios->c_cflag & CSIZE) { | 1683 | switch (termios->c_cflag & CSIZE) { |
1684 | case CS5: | 1684 | case CS5: |
1685 | cval = 0x00; | 1685 | cval = UART_LCR_WLEN5; |
1686 | break; | 1686 | break; |
1687 | case CS6: | 1687 | case CS6: |
1688 | cval = 0x01; | 1688 | cval = UART_LCR_WLEN6; |
1689 | break; | 1689 | break; |
1690 | case CS7: | 1690 | case CS7: |
1691 | cval = 0x02; | 1691 | cval = UART_LCR_WLEN7; |
1692 | break; | 1692 | break; |
1693 | default: | 1693 | default: |
1694 | case CS8: | 1694 | case CS8: |
1695 | cval = 0x03; | 1695 | cval = UART_LCR_WLEN8; |
1696 | break; | 1696 | break; |
1697 | } | 1697 | } |
1698 | 1698 | ||
1699 | if (termios->c_cflag & CSTOPB) | 1699 | if (termios->c_cflag & CSTOPB) |
1700 | cval |= 0x04; | 1700 | cval |= UART_LCR_STOP; |
1701 | if (termios->c_cflag & PARENB) | 1701 | if (termios->c_cflag & PARENB) |
1702 | cval |= UART_LCR_PARITY; | 1702 | cval |= UART_LCR_PARITY; |
1703 | if (!(termios->c_cflag & PARODD)) | 1703 | if (!(termios->c_cflag & PARODD)) |