From patchwork Sun Nov 13 19:03:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 9425139 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E4E2D600CA for ; Sun, 13 Nov 2016 22:25:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5B1D287CC for ; Sun, 13 Nov 2016 22:25:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7D2028899; Sun, 13 Nov 2016 22:25:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00, DATE_IN_PAST_03_06, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 52EDC287CC for ; Sun, 13 Nov 2016 22:25:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c63BI-0008Al-FP; Sun, 13 Nov 2016 22:23:20 +0000 Received: from mail1.windriver.com ([147.11.146.13]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c637u-0003w7-9R for linux-arm-kernel@lists.infradead.org; Sun, 13 Nov 2016 22:19:53 +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.2/8.15.1) with ESMTP id uADMJFHk017711; Sun, 13 Nov 2016 14:19:15 -0800 (PST) Received: from yow-lpgnfs-02.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.294.0; Sun, 13 Nov 2016 14:19:15 -0800 From: Paul Gortmaker To: Subject: [PATCH 3/3] soc: fsl: make guts driver explicitly non-modular Date: Sun, 13 Nov 2016 14:03:02 -0500 Message-ID: <20161113190302.18099-4-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161113190302.18099-1-paul.gortmaker@windriver.com> References: <20161113190302.18099-1-paul.gortmaker@windriver.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161113_141950_590015_A4C7120B X-CRM114-Status: GOOD ( 20.11 ) 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: Ulf Hansson , Arnd Bergmann , Scott Wood , Paul Gortmaker , Yangbo Lu , linuxppc-dev@lists.ozlabs.org, 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-Virus-Scanned: ClamAV using ClamSMTP The Kconfig currently controlling compilation of this code is: drivers/soc/fsl/Kconfig:config FSL_GUTS drivers/soc/fsl/Kconfig: bool ...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. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since the code was already not using module_init, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Cc: Scott Wood Cc: Yangbo Lu Cc: Arnd Bergmann Cc: Ulf Hansson Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker Acked-by: Scott Wood --- drivers/soc/fsl/guts.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c index 0ac88263c2d7..b4d2fd9263b2 100644 --- a/drivers/soc/fsl/guts.c +++ b/drivers/soc/fsl/guts.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include @@ -180,12 +180,6 @@ static int fsl_guts_probe(struct platform_device *pdev) return 0; } -static int fsl_guts_remove(struct platform_device *dev) -{ - soc_device_unregister(soc_dev); - return 0; -} - /* * Table for matching compatible strings, for device tree * guts node, for Freescale QorIQ SOCs. @@ -212,15 +206,14 @@ static const struct of_device_id fsl_guts_of_match[] = { { .compatible = "fsl,ls2080a-dcfg", }, {} }; -MODULE_DEVICE_TABLE(of, fsl_guts_of_match); static struct platform_driver fsl_guts_driver = { .driver = { .name = "fsl-guts", + .suppress_bind_attrs = true, .of_match_table = fsl_guts_of_match, }, .probe = fsl_guts_probe, - .remove = fsl_guts_remove, }; static int __init fsl_guts_init(void) @@ -228,9 +221,3 @@ static int __init fsl_guts_init(void) return platform_driver_register(&fsl_guts_driver); } core_initcall(fsl_guts_init); - -static void __exit fsl_guts_exit(void) -{ - platform_driver_unregister(&fsl_guts_driver); -} -module_exit(fsl_guts_exit);