Skip to content

Commit

Permalink
MIPS: ath25: Avoid undefined early_serial_setup() without SERIAL_8250…
Browse files Browse the repository at this point in the history
…_CONSOLE

Currently MIPS allnoconfig with CONFIG_ATH25=y fails to link due to
missing support for early_serial_setup():

  LD      vmlinux
arch/mips/ath25/devices.o: In function ath25_serial_setup':
devices.c:(.init.text+0x68): undefined reference to 'early_serial_setup'

Rather than adding dependencies to the platform to force inclusion of
SERIAL_8250_CONSOLE together with it's dependencies like TTY, HAS_IOMEM,
etc, just make ath25_serial_setup() a no-op when the dependency is not
selected in the kernel config.

Signed-off-by: Matt Redfearn <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Philippe Ombredanne <[email protected]>
Cc: Kate Stewart <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/17700/
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
mpredfearn authored and ralfbaechle committed Jan 10, 2018
1 parent 0a5191e commit 9dd79fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/mips/ath25/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const char *get_system_type(void)

void __init ath25_serial_setup(u32 mapbase, int irq, unsigned int uartclk)
{
#ifdef CONFIG_SERIAL_8250_CONSOLE
struct uart_port s;

memset(&s, 0, sizeof(s));
Expand All @@ -85,6 +86,7 @@ void __init ath25_serial_setup(u32 mapbase, int irq, unsigned int uartclk)
s.uartclk = uartclk;

early_serial_setup(&s);
#endif /* CONFIG_SERIAL_8250_CONSOLE */
}

int __init ath25_add_wmac(int nr, u32 base, int irq)
Expand Down

0 comments on commit 9dd79fe

Please sign in to comment.