From patchwork Sun Aug 9 00:51:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 6977921 Return-Path: X-Original-To: patchwork-linux-arm@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 472D49F358 for ; Sun, 9 Aug 2015 00:56:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6400F2077F for ; Sun, 9 Aug 2015 00:56:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 73B882077D for ; Sun, 9 Aug 2015 00:56:40 +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 1ZOEqi-0003k7-BS; Sun, 09 Aug 2015 00:52:28 +0000 Received: from mail1.windriver.com ([147.11.146.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZOEqY-0003fp-6z for linux-arm-kernel@lists.infradead.org; Sun, 09 Aug 2015 00:52:19 +0000 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.1/8.15.1) with ESMTPS id t790proE004919 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sat, 8 Aug 2015 17:51:53 -0700 (PDT) Received: from yow-lpgnfs-02.corp.ad.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.235.1; Sat, 8 Aug 2015 17:51:52 -0700 From: Paul Gortmaker To: Subject: [PATCH 5/5] drivers/tty: make serial 8250_lpc18xx.c explicitly non-modular Date: Sat, 8 Aug 2015 20:51:37 -0400 Message-ID: <1439081497-14986-6-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1439081497-14986-1-git-send-email-paul.gortmaker@windriver.com> References: <1439081497-14986-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150808_175218_439519_D2142ABB X-CRM114-Status: GOOD ( 20.08 ) X-Spam-Score: -4.6 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , Joachim Eastwood , Paul Gortmaker , linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 The Kconfig currently controlling compilation of this code is: 8250/Kconfig:config SERIAL_8250_LPC18XX 8250/Kconfig: bool "NXP LPC18xx/43xx serial port support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We leave some tags like MODULE_AUTHOR for documentation purposes. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Joachim Eastwood Cc: linux-serial@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker --- drivers/tty/serial/8250/8250_lpc18xx.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/tty/serial/8250/8250_lpc18xx.c b/drivers/tty/serial/8250/8250_lpc18xx.c index 99cd478851ff..f5112bee1ab6 100644 --- a/drivers/tty/serial/8250/8250_lpc18xx.c +++ b/drivers/tty/serial/8250/8250_lpc18xx.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include @@ -198,33 +198,22 @@ dis_clk_reg: return ret; } -static int lpc18xx_serial_remove(struct platform_device *pdev) -{ - struct lpc18xx_uart_data *data = platform_get_drvdata(pdev); - - serial8250_unregister_port(data->line); - clk_disable_unprepare(data->clk_uart); - clk_disable_unprepare(data->clk_reg); - - return 0; -} - static const struct of_device_id lpc18xx_serial_match[] = { { .compatible = "nxp,lpc1850-uart" }, { }, }; -MODULE_DEVICE_TABLE(of, lpc18xx_serial_match); static struct platform_driver lpc18xx_serial_driver = { .probe = lpc18xx_serial_probe, - .remove = lpc18xx_serial_remove, .driver = { .name = "lpc18xx-uart", .of_match_table = lpc18xx_serial_match, }, }; -module_platform_driver(lpc18xx_serial_driver); +builtin_platform_driver(lpc18xx_serial_driver); +/* MODULE_AUTHOR("Joachim Eastwood "); MODULE_DESCRIPTION("Serial port driver NXP LPC18xx/43xx devices"); MODULE_LICENSE("GPL v2"); +*/