Skip to content

Commit

Permalink
[POWERPC] UPIO_TSI cleanup
Browse files Browse the repository at this point in the history
(le32_to_cpu(x) >> 8) & 0xff is a very odd way to spell (x >> 16) & 0xff,
even if that code is hit only on ppc.  The value is host-endian - we've
got it from readl(), after all...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Al Viro authored and Paul Mackerras committed Sep 26, 2006
1 parent c32527a commit 9e84b60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ static unsigned int serial_in(struct uart_8250_port *up, int offset)

case UPIO_TSI:
if (offset == UART_IIR) {
tmp = readl((u32 *)(up->port.membase + UART_RX));
return (cpu_to_le32(tmp) >> 8) & 0xff;
tmp = readl(up->port.membase + (UART_IIR & ~3));
return (tmp >> 16) & 0xff; /* UART_IIR % 4 == 2 */
} else
return readb(up->port.membase + offset);

Expand Down

0 comments on commit 9e84b60

Please sign in to comment.