Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751812AbbETBer (ORCPT ); Tue, 19 May 2015 21:34:47 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:38786 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750734AbbETBep (ORCPT ); Tue, 19 May 2015 21:34:45 -0400 X-Listener-Flag: 11101 Message-ID: <1432085679.18194.1.camel@mtksdaap41> Subject: Re: [PATCH] tty: serial/8250: remove console dependency for mediatek From: Eddie Huang To: Arnd Bergmann CC: Greg Kroah-Hartman , Matthias Brugger , , , , Jiri Slaby , Date: Wed, 20 May 2015 09:34:39 +0800 In-Reply-To: <2421682.546VBfrkgn@wuerfel> References: <2421682.546VBfrkgn@wuerfel> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1689 Lines: 52 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 > > 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 Thanks your correction. Eddie -- 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/