From patchwork Tue May 19 20:11:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 6440471 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 85A729F318 for ; Tue, 19 May 2015 20:11:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B42CE203B6 for ; Tue, 19 May 2015 20:11:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3946203B5 for ; Tue, 19 May 2015 20:11:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yunrk-0005cJ-0T; Tue, 19 May 2015 20:11:52 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yunrh-0005aP-HR; Tue, 19 May 2015 20:11:50 +0000 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0M1kNy-1Z9Zmr0Ncw-00to6i; Tue, 19 May 2015 22:11:15 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman 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 X-Provags-ID: V03:K0:RHdYBc0P+hEgMwAwM+CXno2s5yeVeVks/ebCiO0tQPHeXTPrtY1 agBw+LNCR1hLRxieTXL/4XhsL564QYJmXXu7GpXgHbGg3HQdy0fJ6+Ge9wLzyTSZUn2ySiV KORAoPQfdFOReKFrrtsXxqnmy4JuW2M7K41B72uNsYgZUk4H7ckl1dtvy/Q60IAtrk+SEKs zB8B+Nqy1SbLcLIGY1UFQ== X-UI-Out-Filterresults: notjunk:1; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150519_131149_929752_2D5F59AA X-CRM114-Status: UNSURE ( 8.77 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.1 (-) Cc: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-serial@vger.kernel.org, Matthias Brugger , Eddie Huang , Jiri Slaby , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Eddie Huang 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");