From patchwork Sat Dec 1 19:19:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 10707773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E98313AD for ; Sat, 1 Dec 2018 19:21:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AE5A2BF5D for ; Sat, 1 Dec 2018 19:21:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B2252C8FD; Sat, 1 Dec 2018 19:21:23 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 160512BF5D for ; Sat, 1 Dec 2018 19:21:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725732AbeLBGee (ORCPT ); Sun, 2 Dec 2018 01:34:34 -0500 Received: from mail.windriver.com ([147.11.1.11]:60834 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725731AbeLBGee (ORCPT ); Sun, 2 Dec 2018 01:34:34 -0500 Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id wB1JLIJO025231 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sat, 1 Dec 2018 11:21:18 -0800 (PST) Received: from yow-cube1.wrs.com (128.224.56.98) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.408.0; Sat, 1 Dec 2018 11:21:18 -0800 From: Paul Gortmaker To: Joerg Roedel CC: , , Paul Gortmaker , Rob Clark , Subject: [PATCH 6/9] iommu/qcom: Make it explicitly non-modular Date: Sat, 1 Dec 2018 14:19:14 -0500 Message-ID: <1543691957-17608-7-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543691957-17608-1-git-send-email-paul.gortmaker@windriver.com> References: <1543691957-17608-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Kconfig currently controlling compilation of this code is: drivers/iommu/Kconfig:config MTK_IOMMU_V1 drivers/iommu/Kconfig: bool "MTK IOMMU Version 1 (M4U gen1) 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_init just becomes device_initcall for non-modules, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Rob Clark Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/iommu/qcom_iommu.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c index ee70e9921cf1..4c8f4fc54106 100644 --- a/drivers/iommu/qcom_iommu.c +++ b/drivers/iommu/qcom_iommu.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -908,7 +908,6 @@ static const struct of_device_id qcom_iommu_of_match[] = { { .compatible = "qcom,msm-iommu-v1" }, { /* sentinel */ } }; -MODULE_DEVICE_TABLE(of, qcom_iommu_of_match); static struct platform_driver qcom_iommu_driver = { .driver = { @@ -934,15 +933,4 @@ static int __init qcom_iommu_init(void) return ret; } - -static void __exit qcom_iommu_exit(void) -{ - platform_driver_unregister(&qcom_iommu_driver); - platform_driver_unregister(&qcom_iommu_ctx_driver); -} - -module_init(qcom_iommu_init); -module_exit(qcom_iommu_exit); - -MODULE_DESCRIPTION("IOMMU API for QCOM IOMMU v1 implementations"); -MODULE_LICENSE("GPL v2"); +device_initcall(qcom_iommu_init);