lkml.org 
[lkml]   [2016]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] MIPS: rb532: Fix undefined reference to setup_serial_port
Date
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@imgtec.com>

---

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
\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.064 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site