* [PATCH] tty: serial/8250: remove console dependency for mediatek
@ 2015-05-19 20:11 Arnd Bergmann
2015-05-20 1:34 ` Eddie Huang
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2015-05-19 20:11 UTC (permalink / raw)
To: linux-arm-kernel
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");
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] tty: serial/8250: remove console dependency for mediatek
2015-05-19 20:11 [PATCH] tty: serial/8250: remove console dependency for mediatek Arnd Bergmann
@ 2015-05-20 1:34 ` Eddie Huang
0 siblings, 0 replies; 2+ messages in thread
From: Eddie Huang @ 2015-05-20 1:34 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
On Tue, 2015-05-19 at 22:11 +0200, Arnd Bergmann wrote:
> 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");
>
Acked-by: Eddie Huang <eddie.huang@mediatek.com>
Thanks your correction.
Eddie
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-20 1:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-19 20:11 [PATCH] tty: serial/8250: remove console dependency for mediatek Arnd Bergmann
2015-05-20 1:34 ` Eddie Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).