aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-09-22 20:39:45 -0400
committerPaul Mackerras <paulus@samba.org>2006-09-26 01:41:02 -0400
commit9e84b60ed87f5fe2dce10be2db1bfbb926a49e66 (patch)
tree1b22fef0ec6cf172a4e6d2962700679ba99c5a85 /drivers/serial
parentc32527a14049130eb29103b8da27520f07092371 (diff)
[POWERPC] UPIO_TSI cleanup
(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>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 0ae9ced00ed4..10c2daab99ac 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -320,8 +320,8 @@ static unsigned int serial_in(struct uart_8250_port *up, int offset)
320 320
321 case UPIO_TSI: 321 case UPIO_TSI:
322 if (offset == UART_IIR) { 322 if (offset == UART_IIR) {
323 tmp = readl((u32 *)(up->port.membase + UART_RX)); 323 tmp = readl(up->port.membase + (UART_IIR & ~3));
324 return (cpu_to_le32(tmp) >> 8) & 0xff; 324 return (tmp >> 16) & 0xff; /* UART_IIR % 4 == 2 */
325 } else 325 } else
326 return readb(up->port.membase + offset); 326 return readb(up->port.membase + offset);
327 327