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/pxa.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/pxa.c')
-rw-r--r-- | drivers/serial/pxa.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 9dc151d8fa61..08b08d6ae904 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -455,22 +455,22 @@ serial_pxa_set_termios(struct uart_port *port, struct termios *termios, | |||
455 | 455 | ||
456 | switch (termios->c_cflag & CSIZE) { | 456 | switch (termios->c_cflag & CSIZE) { |
457 | case CS5: | 457 | case CS5: |
458 | cval = 0x00; | 458 | cval = UART_LCR_WLEN5; |
459 | break; | 459 | break; |
460 | case CS6: | 460 | case CS6: |
461 | cval = 0x01; | 461 | cval = UART_LCR_WLEN6; |
462 | break; | 462 | break; |
463 | case CS7: | 463 | case CS7: |
464 | cval = 0x02; | 464 | cval = UART_LCR_WLEN7; |
465 | break; | 465 | break; |
466 | default: | 466 | default: |
467 | case CS8: | 467 | case CS8: |
468 | cval = 0x03; | 468 | cval = UART_LCR_WLEN8; |
469 | break; | 469 | break; |
470 | } | 470 | } |
471 | 471 | ||
472 | if (termios->c_cflag & CSTOPB) | 472 | if (termios->c_cflag & CSTOPB) |
473 | cval |= 0x04; | 473 | cval |= UART_LCR_STOP; |
474 | if (termios->c_cflag & PARENB) | 474 | if (termios->c_cflag & PARENB) |
475 | cval |= UART_LCR_PARITY; | 475 | cval |= UART_LCR_PARITY; |
476 | if (!(termios->c_cflag & PARODD)) | 476 | if (!(termios->c_cflag & PARODD)) |