[PATCH] MIPS: rb532: Fix undefined reference to setup_serial_port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the rb532 machine is compiled without CONFIG_SERIAL_8250, the
following linker error occurs

arch/mips/built-in.o: In function `setup_serial_port':
(.init.text+0x20c): undefined reference to `early_serial_setup'

Fix this by wrapping registration of the rb532 uart in an ifdef
CONFIG_SERIAL_8250.

Signed-off-by: Matt Redfearn <matt.redfearn@xxxxxxxxxx>

---

 arch/mips/rb532/serial.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/mips/rb532/serial.c b/arch/mips/rb532/serial.c
index 70482540b3db..f0ea2de38840 100644
--- a/arch/mips/rb532/serial.c
+++ b/arch/mips/rb532/serial.c
@@ -36,6 +36,8 @@
 
 extern unsigned int idt_cpu_freq;
 
+#ifdef CONFIG_SERIAL_8250
+
 static struct uart_port rb532_uart = {
 	.flags = UPF_BOOT_AUTOCONF,
 	.line = 0,
@@ -52,3 +54,6 @@ int __init setup_serial_port(void)
 	return early_serial_setup(&rb532_uart);
 }
 arch_initcall(setup_serial_port);
+
+#endif /* CONFIG_SERIAL_8250 */
+
-- 
2.7.4





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux