]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/mips/loongson/common/serial.c
MIPS: Loongson: Cleanups of serial port support
[mv-sheeva.git] / arch / mips / loongson / common / serial.c
index ea29db099aee9e9fc6f383ee70dd2b6a7f082a94..23b66a5f88cb2dcc3a3e27db58b1304a2c882e19 100644 (file)
@@ -57,12 +57,16 @@ static struct platform_device uart8250_device = {
 
 static int __init serial_init(void)
 {
-       if (uart8250_data[mips_machtype][0].iotype == UPIO_MEM)
+       unsigned char iotype;
+
+       iotype = uart8250_data[mips_machtype][0].iotype;
+
+       if (UPIO_MEM == iotype)
                uart8250_data[mips_machtype][0].membase =
                        (void __iomem *)_loongson_uart_base;
-       else if (uart8250_data[mips_machtype][0].iotype == UPIO_PORT)
+       else if (UPIO_PORT == iotype)
                uart8250_data[mips_machtype][0].iobase =
-                   uart8250_base[mips_machtype] - LOONGSON_PCIIO_BASE;
+                   loongson_uart_base - LOONGSON_PCIIO_BASE;
 
        uart8250_device.dev.platform_data = uart8250_data[mips_machtype];