From patchwork Wed Feb 17 15:02:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102755 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp51111lbl; Wed, 17 Feb 2016 07:05:45 -0800 (PST) X-Received: by 10.98.9.27 with SMTP id e27mr2761926pfd.59.1455721545829; Wed, 17 Feb 2016 07:05:45 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hc1si2490054pac.16.2016.02.17.07.05.45; Wed, 17 Feb 2016 07:05:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965392AbcBQPFo (ORCPT + 1 other); Wed, 17 Feb 2016 10:05:44 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:49304 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965324AbcBQPFn (ORCPT ); Wed, 17 Feb 2016 10:05:43 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0MH3Pq-1ajrRX3k6U-00Dma2; Wed, 17 Feb 2016 16:04:40 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Paul Gortmaker , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Peter Hurley , Jiri Slaby , Matthias Brugger , Sascha Hauer , Eddie Huang , Heikki Krogerus , Andy Shevchenko , Martin Sperl , Paul Burton , Mans Rullgard , Scott Wood , linux-mediatek@lists.infradead.org Subject: [PATCH v3 5/5] serial: 8250/mediatek: fix building with SERIAL_8250=m Date: Wed, 17 Feb 2016 16:02:35 +0100 Message-Id: <1455721357-4008289-6-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455721357-4008289-1-git-send-email-arnd@arndb.de> References: <1455721357-4008289-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:6zsR31QYqQcnBbjGVYMeM9LCVb9qEmTzLIuJd5kc8FVwehds5Wa oy6LN+7+75D/8BCMumaUW/P+EE5NUpIaH38n/KbbGuAAD+YGbMZMzLJV+8WuVBlO0ydMNVb fTIOUAO4s52tmUISYau8paLFqVzPMJrIKsnYhjdkL5N2spte3N7eeDgkp6mkCqIFxjv6/jc 46OucOJOO29LFKTqwEisQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:nhwzOhcYf8g=:Ut5+YdrWAkNnRvHp63rGVh y3zVV2P3GCTmOB6Kx0zmsiaKLgoQdncAdt+zQT0hhy7aIGskqBUgkecRSvjuMG956GuNXEJ8M 9uM8O/f6cNzObKAaBc6u90HZzAllrjpL6Cq3cwhsUGNDdvpK8iGPFDwcNjLAxAhFhQN04jNee DBLSzfbyBL5tHWfOe9qFlcqx4RKEuA8jbeeB4xI9mVZsUXhAVLvcA5AHy7QR/pkP7jNDl5ANF CJ2YewU1ifry7ibsFVO+4sX531++YUAlCGqleQUhcFPCDb4hW+WsNmqQ+pCXJ4ZDS9SAjQWjC lWk+7gIQcs7ucukDoaGSacjTqTE4R76XQWy/zlB1pk4cQVPh+n75mB6+NYUWlS/etlfJxkfHZ 6vFXqHnCo4RpH32+hdpcHKkQFTy5j2KcktTveyKLibJx8lTr9xPe7DNjMW/d2jekHF5fkPxjb tCM2YS0Y0SZJkisaPgzesXZLDfzXqT+qrK0Sf/whpQYVJ3g24Ae583CK5ophNYfGPLMkZ/pa2 rjYgHOpDSPcWVpDfauU5btMhGixhky8kU3YM+4S+Ua5bb758ib0HONumCPiyt4aakYxxAQlLC 2BOqx3Cs/kXodMHB2CvtWtOsEDzvcOlv8fP8mPEZUz5QwDFpkTS8S+xnPpKKGw4VmjIvI+zUp Gxm0pkCeQfLS9R840BRpuxKhfIgc32yn6mRD67eryzNrLrXGNc3G0gf+NzqGPXX8g7vg= Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org The Mediatek 8250 driver has a 'bool' Kconfig symbol, but that breaks when SERIAL_8250 is a loadable module: drivers/tty/built-in.o: In function `mtk8250_set_termios': :(.text+0x1bee8): undefined reference to `serial8250_do_set_termios' :(.text+0x1bf10): undefined reference to `uart_get_baud_rate' :(.text+0x1c09c): undefined reference to `uart_get_divisor' drivers/tty/built-in.o: In function `mtk8250_do_pm': :(.text+0x1c0d0): undefined reference to `serial8250_do_pm' drivers/tty/built-in.o: In function `mtk8250_probe': :(.text+0x1c2e4): undefined reference to `serial8250_register_8250_port' serial/8250/8250_mtk.c:287:242: error: data definition has no type or storage class [-Werror] serial/8250/8250_mtk.c:287:122: error: 'mtk8250_platform_driver_init' defined but not used [-Werror=unused-function] This changes the symbol to a 'tristate', so the dependency on SERIAL_8250 also works when that is set to 'm'. To actually build the driver, we also need to include . Signed-off-by: Arnd Bergmann Acked-by: Matthias Brugger --- drivers/tty/serial/8250/8250_mtk.c | 2 +- drivers/tty/serial/8250/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index 6ecc6e3e82dc..a0294f3de4f8 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c @@ -303,7 +303,7 @@ static struct platform_driver mtk8250_platform_driver = { }; module_platform_driver(mtk8250_platform_driver); -#ifdef CONFIG_SERIAL_8250_CONSOLE +#if defined(CONFIG_SERIAL_8250_CONSOLE) && !defined(MODULE) static int __init early_mtk8250_setup(struct earlycon_device *device, const char *options) { diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig index 1b0638511ac1..c45a02a7f9e2 100644 --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig @@ -370,7 +370,7 @@ config SERIAL_8250_LPC18XX serial port, say Y to this option. If unsure, say Y. config SERIAL_8250_MT6577 - bool "Mediatek serial port support" + tristate "Mediatek serial port support" depends on SERIAL_8250 && ARCH_MEDIATEK help If you have a Mediatek based board and want to use the