mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
amba-pl011, rename BIT macro
amba-pl011, rename BIT macro Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b7b5a1282c
commit
5159f40742
1 changed files with 13 additions and 13 deletions
|
@ -263,15 +263,15 @@ static unsigned int pl01x_get_mctrl(struct uart_port *port)
|
||||||
unsigned int result = 0;
|
unsigned int result = 0;
|
||||||
unsigned int status = readw(uap->port.membase + UART01x_FR);
|
unsigned int status = readw(uap->port.membase + UART01x_FR);
|
||||||
|
|
||||||
#define BIT(uartbit, tiocmbit) \
|
#define TIOCMBIT(uartbit, tiocmbit) \
|
||||||
if (status & uartbit) \
|
if (status & uartbit) \
|
||||||
result |= tiocmbit
|
result |= tiocmbit
|
||||||
|
|
||||||
BIT(UART01x_FR_DCD, TIOCM_CAR);
|
TIOCMBIT(UART01x_FR_DCD, TIOCM_CAR);
|
||||||
BIT(UART01x_FR_DSR, TIOCM_DSR);
|
TIOCMBIT(UART01x_FR_DSR, TIOCM_DSR);
|
||||||
BIT(UART01x_FR_CTS, TIOCM_CTS);
|
TIOCMBIT(UART01x_FR_CTS, TIOCM_CTS);
|
||||||
BIT(UART011_FR_RI, TIOCM_RNG);
|
TIOCMBIT(UART011_FR_RI, TIOCM_RNG);
|
||||||
#undef BIT
|
#undef TIOCMBIT
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,18 +282,18 @@ static void pl011_set_mctrl(struct uart_port *port, unsigned int mctrl)
|
||||||
|
|
||||||
cr = readw(uap->port.membase + UART011_CR);
|
cr = readw(uap->port.membase + UART011_CR);
|
||||||
|
|
||||||
#define BIT(tiocmbit, uartbit) \
|
#define TIOCMBIT(tiocmbit, uartbit) \
|
||||||
if (mctrl & tiocmbit) \
|
if (mctrl & tiocmbit) \
|
||||||
cr |= uartbit; \
|
cr |= uartbit; \
|
||||||
else \
|
else \
|
||||||
cr &= ~uartbit
|
cr &= ~uartbit
|
||||||
|
|
||||||
BIT(TIOCM_RTS, UART011_CR_RTS);
|
TIOCMBIT(TIOCM_RTS, UART011_CR_RTS);
|
||||||
BIT(TIOCM_DTR, UART011_CR_DTR);
|
TIOCMBIT(TIOCM_DTR, UART011_CR_DTR);
|
||||||
BIT(TIOCM_OUT1, UART011_CR_OUT1);
|
TIOCMBIT(TIOCM_OUT1, UART011_CR_OUT1);
|
||||||
BIT(TIOCM_OUT2, UART011_CR_OUT2);
|
TIOCMBIT(TIOCM_OUT2, UART011_CR_OUT2);
|
||||||
BIT(TIOCM_LOOP, UART011_CR_LBE);
|
TIOCMBIT(TIOCM_LOOP, UART011_CR_LBE);
|
||||||
#undef BIT
|
#undef TIOCMBIT
|
||||||
|
|
||||||
writew(cr, uap->port.membase + UART011_CR);
|
writew(cr, uap->port.membase + UART011_CR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue