aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-24 14:48:22 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-06-24 14:48:22 -0400
commit0a8b80c52f44a6e84206618a8a450ba13a5809dc (patch)
tree0ac9a71b3820e6d5876266aa50fa55abcfc5bf5d /drivers/serial
parent59a49e38711a146dc0bef4837c825b5422335460 (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')
-rw-r--r--drivers/serial/8250.c10
-rw-r--r--drivers/serial/au1x00_uart.c10
-rw-r--r--drivers/serial/m32r_sio.c10
-rw-r--r--drivers/serial/pxa.c10
4 files changed, 20 insertions, 20 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 79f67fd863ec..d8b9d2b8c200 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))
diff --git a/drivers/serial/au1x00_uart.c b/drivers/serial/au1x00_uart.c
index b6d3d5034940..5400dc2c087e 100644
--- a/drivers/serial/au1x00_uart.c
+++ b/drivers/serial/au1x00_uart.c
@@ -773,22 +773,22 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios,
773 773
774 switch (termios->c_cflag & CSIZE) { 774 switch (termios->c_cflag & CSIZE) {
775 case CS5: 775 case CS5:
776 cval = 0x00; 776 cval = UART_LCR_WLEN5;
777 break; 777 break;
778 case CS6: 778 case CS6:
779 cval = 0x01; 779 cval = UART_LCR_WLEN6;
780 break; 780 break;
781 case CS7: 781 case CS7:
782 cval = 0x02; 782 cval = UART_LCR_WLEN7;
783 break; 783 break;
784 default: 784 default:
785 case CS8: 785 case CS8:
786 cval = 0x03; 786 cval = UART_LCR_WLEN8;
787 break; 787 break;
788 } 788 }
789 789
790 if (termios->c_cflag & CSTOPB) 790 if (termios->c_cflag & CSTOPB)
791 cval |= 0x04; 791 cval |= UART_LCR_STOP;
792 if (termios->c_cflag & PARENB) 792 if (termios->c_cflag & PARENB)
793 cval |= UART_LCR_PARITY; 793 cval |= UART_LCR_PARITY;
794 if (!(termios->c_cflag & PARODD)) 794 if (!(termios->c_cflag & PARODD))
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c
index 08d61f13edc6..0301feacbde4 100644
--- a/drivers/serial/m32r_sio.c
+++ b/drivers/serial/m32r_sio.c
@@ -724,22 +724,22 @@ static void m32r_sio_set_termios(struct uart_port *port,
724 724
725 switch (termios->c_cflag & CSIZE) { 725 switch (termios->c_cflag & CSIZE) {
726 case CS5: 726 case CS5:
727 cval = 0x00; 727 cval = UART_LCR_WLEN5;
728 break; 728 break;
729 case CS6: 729 case CS6:
730 cval = 0x01; 730 cval = UART_LCR_WLEN6;
731 break; 731 break;
732 case CS7: 732 case CS7:
733 cval = 0x02; 733 cval = UART_LCR_WLEN7;
734 break; 734 break;
735 default: 735 default:
736 case CS8: 736 case CS8:
737 cval = 0x03; 737 cval = UART_LCR_WLEN8;
738 break; 738 break;
739 } 739 }
740 740
741 if (termios->c_cflag & CSTOPB) 741 if (termios->c_cflag & CSTOPB)
742 cval |= 0x04; 742 cval |= UART_LCR_STOP;
743 if (termios->c_cflag & PARENB) 743 if (termios->c_cflag & PARENB)
744 cval |= UART_LCR_PARITY; 744 cval |= UART_LCR_PARITY;
745 if (!(termios->c_cflag & PARODD)) 745 if (!(termios->c_cflag & PARODD))
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))