summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/8250/8250_mtk.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-05-19 23:11:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-24 23:06:09 +0300
commit7798edeebc8101b1e8b1d7fb9eee3710f0877cbc (patch)
treec32194875d5579ce6fc054d1ea321b3c47bb7e1a /drivers/tty/serial/8250/8250_mtk.c
parent357d56151976a78d90dc3dfac01777de0ef05212 (diff)
downloadlinux-7798edeebc8101b1e8b1d7fb9eee3710f0877cbc.tar.xz
tty: serial/8250: remove console dependency for mediatek
If the mediatek serial port driver is built-in, but serial console is disabled in Kconfig (e.g. when the serial driver itself is a loadable module), we get this build error: drivers/built-in.o: In function `early_mtk8250_setup': undefined reference to `early_serial8250_setup' To avoid that problem, this patch encloses the early_mtk8250_setup function in #ifdef CONFIG_SERIAL_8250_CONSOLE, the same symbol that guards the early_serial8250_setup function. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Eddie Huang <eddie.huang@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_mtk.c')
-rw-r--r--drivers/tty/serial/8250/8250_mtk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
index 4488c2bdb7ba..78883ca64ddd 100644
--- a/drivers/tty/serial/8250/8250_mtk.c
+++ b/drivers/tty/serial/8250/8250_mtk.c
@@ -305,6 +305,7 @@ static struct platform_driver mtk8250_platform_driver = {
};
module_platform_driver(mtk8250_platform_driver);
+#ifdef CONFIG_SERIAL_8250_CONSOLE
static int __init early_mtk8250_setup(struct earlycon_device *device,
const char *options)
{
@@ -317,6 +318,7 @@ static int __init early_mtk8250_setup(struct earlycon_device *device,
}
OF_EARLYCON_DECLARE(mtk8250, "mediatek,mt6577-uart", early_mtk8250_setup);
+#endif
MODULE_AUTHOR("Matthias Brugger");
MODULE_LICENSE("GPL");