From: Arnd Bergmann <arnd@arndb.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
linux-serial@vger.kernel.org,
Eddie Huang <eddie.huang@mediatek.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, Jiri Slaby <jslaby@suse.cz>,
linux-kernel@vger.kernel.org
Subject: [PATCH] tty: serial/8250: remove console dependency for mediatek
Date: Tue, 19 May 2015 22:11:09 +0200 [thread overview]
Message-ID: <2421682.546VBfrkgn@wuerfel> (raw)
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>
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");
next reply other threads:[~2015-05-19 20:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 20:11 Arnd Bergmann [this message]
2015-05-20 1:34 ` [PATCH] tty: serial/8250: remove console dependency for mediatek Eddie Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2421682.546VBfrkgn@wuerfel \
--to=arnd@arndb.de \
--cc=eddie.huang@mediatek.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox