linux-mips
[Top] [All Lists]

[PATCH 1/2] ar7: fix build failures when CONFIG_SERIAL_8250 is not enabl

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 1/2] ar7: fix build failures when CONFIG_SERIAL_8250 is not enabled
From: Florian Fainelli <florian@openwrt.org>
Date: Tue, 21 Jul 2009 12:37:37 +0200
Cc: linux-mips@linux-mips.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:date:subject :mime-version:x-uid:x-length:to:cc:content-type :content-transfer-encoding:content-disposition:message-id; bh=O6m2XvcpZhTTR/eJosKRF7I6KITfUB/O7WgDGGbfX68=; b=ND1vwzybV6IMYAh83gxC3ilHI9+w2ApsIk3tdMG8fEksyXR5dbqX4RlqEbbCzezEV+ KmfS/uNYYM5ParueVytaKcbOnYlZfzuo4vLM09nVyBcNzVfkZ+of7JvMVYF71X1Ew0Np ZhH2M/n1/4WTeu5Ov0ZoHAhyqv3168nmc4K4s=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:date:subject:mime-version:x-uid:x-length:to:cc :content-type:content-transfer-encoding:content-disposition :message-id; b=L2dzYJjyPIjw0Jlz306Pvpm8aJG54FfeOjRLudO14KQSACr0pqLXVxNAGIWnmGHgQ0 T9W2cVGWn+eE89BrvthWijID2eM3B5mgeqYVZOFBQGxWTzKBsOZDPvV+u3qHStUqPgpc 1AP9/OvfD9l5Ee81JG3sgqyKxA8yZUoKy0SiQ=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
This patch fixes the following build failure when CONFIG_SERIAL_8250
is not enabled in the kernel configuration:
arch/mips/ar7/built-in.o: In function `ar7_register_devices':
platform.c:(.init.text+0x61c): undefined reference to `early_serial_setup'
platform.c:(.init.text+0x61c): relocation truncated to fit: R_MIPS_26 against 
`early_serial_setup'
platform.c:(.init.text+0x68c): undefined reference to `early_serial_setup'
platform.c:(.init.text+0x68c): relocation truncated to fit: R_MIPS_26 against 
`early_serial_setup'

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index cbe4fa4..d0624d8 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -494,8 +494,9 @@ static void __init detect_leds(void)
 static int __init ar7_register_devices(void)
 {
        int res;
-       static struct uart_port uart_port[2];
        u16 chip_id;
+#ifdef CONFIG_SERIAL_8250
+       static struct uart_port uart_port[2];
 
        memset(uart_port, 0, sizeof(struct uart_port) * 2);
 
@@ -526,7 +527,7 @@ static int __init ar7_register_devices(void)
                if (res)
                        return res;
        }
-
+#endif /* CONFIG_SERIAL_8250 */
        res = platform_device_register(&physmap_flash);
        if (res)
                return res;

<Prev in Thread] Current Thread [Next in Thread>