Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751428AbbESULZ (ORCPT ); Tue, 19 May 2015 16:11:25 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:54359 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750889AbbESULY (ORCPT ); Tue, 19 May 2015 16:11:24 -0400 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Matthias Brugger , linux-serial@vger.kernel.org, Eddie Huang , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Jiri Slaby , linux-kernel@vger.kernel.org Subject: [PATCH] tty: serial/8250: remove console dependency for mediatek Date: Tue, 19 May 2015 22:11:09 +0200 Message-ID: <2421682.546VBfrkgn@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:RHdYBc0P+hEgMwAwM+CXno2s5yeVeVks/ebCiO0tQPHeXTPrtY1 agBw+LNCR1hLRxieTXL/4XhsL564QYJmXXu7GpXgHbGg3HQdy0fJ6+Ge9wLzyTSZUn2ySiV KORAoPQfdFOReKFrrtsXxqnmy4JuW2M7K41B72uNsYgZUk4H7ckl1dtvy/Q60IAtrk+SEKs zB8B+Nqy1SbLcLIGY1UFQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1469 Lines: 39 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 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"); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/