Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a8b80c5 authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[PATCH] Serial: Eliminate magic numbers



Use the existing macros instead.

Signed-off-by: default avatarYoichi Yuasa <yuasa@hh.iij4u.or.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 59a49e38
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1682,22 +1682,22 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios,

	switch (termios->c_cflag & CSIZE) {
	case CS5:
		cval = 0x00;
		cval = UART_LCR_WLEN5;
		break;
	case CS6:
		cval = 0x01;
		cval = UART_LCR_WLEN6;
		break;
	case CS7:
		cval = 0x02;
		cval = UART_LCR_WLEN7;
		break;
	default:
	case CS8:
		cval = 0x03;
		cval = UART_LCR_WLEN8;
		break;
	}

	if (termios->c_cflag & CSTOPB)
		cval |= 0x04;
		cval |= UART_LCR_STOP;
	if (termios->c_cflag & PARENB)
		cval |= UART_LCR_PARITY;
	if (!(termios->c_cflag & PARODD))
+5 −5
Original line number Diff line number Diff line
@@ -773,22 +773,22 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios,

	switch (termios->c_cflag & CSIZE) {
	case CS5:
		cval = 0x00;
		cval = UART_LCR_WLEN5;
		break;
	case CS6:
		cval = 0x01;
		cval = UART_LCR_WLEN6;
		break;
	case CS7:
		cval = 0x02;
		cval = UART_LCR_WLEN7;
		break;
	default:
	case CS8:
		cval = 0x03;
		cval = UART_LCR_WLEN8;
		break;
	}

	if (termios->c_cflag & CSTOPB)
		cval |= 0x04;
		cval |= UART_LCR_STOP;
	if (termios->c_cflag & PARENB)
		cval |= UART_LCR_PARITY;
	if (!(termios->c_cflag & PARODD))
+5 −5
Original line number Diff line number Diff line
@@ -724,22 +724,22 @@ static void m32r_sio_set_termios(struct uart_port *port,

	switch (termios->c_cflag & CSIZE) {
	case CS5:
		cval = 0x00;
		cval = UART_LCR_WLEN5;
		break;
	case CS6:
		cval = 0x01;
		cval = UART_LCR_WLEN6;
		break;
	case CS7:
		cval = 0x02;
		cval = UART_LCR_WLEN7;
		break;
	default:
	case CS8:
		cval = 0x03;
		cval = UART_LCR_WLEN8;
		break;
	}

	if (termios->c_cflag & CSTOPB)
		cval |= 0x04;
		cval |= UART_LCR_STOP;
	if (termios->c_cflag & PARENB)
		cval |= UART_LCR_PARITY;
	if (!(termios->c_cflag & PARODD))
+5 −5
Original line number Diff line number Diff line
@@ -455,22 +455,22 @@ serial_pxa_set_termios(struct uart_port *port, struct termios *termios,

	switch (termios->c_cflag & CSIZE) {
	case CS5:
		cval = 0x00;
		cval = UART_LCR_WLEN5;
		break;
	case CS6:
		cval = 0x01;
		cval = UART_LCR_WLEN6;
		break;
	case CS7:
		cval = 0x02;
		cval = UART_LCR_WLEN7;
		break;
	default:
	case CS8:
		cval = 0x03;
		cval = UART_LCR_WLEN8;
		break;
	}

	if (termios->c_cflag & CSTOPB)
		cval |= 0x04;
		cval |= UART_LCR_STOP;
	if (termios->c_cflag & PARENB)
		cval |= UART_LCR_PARITY;
	if (!(termios->c_cflag & PARODD))