From patchwork Sun Dec 13 01:41:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 556109 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4475D14031F for ; Sun, 13 Dec 2015 12:44:45 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751491AbbLMBnk (ORCPT ); Sat, 12 Dec 2015 20:43:40 -0500 Received: from mail1.windriver.com ([147.11.146.13]:63526 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbbLMBnS (ORCPT ); Sat, 12 Dec 2015 20:43:18 -0500 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 ESMTPS id tBD1gcv2001547 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sat, 12 Dec 2015 17:42:38 -0800 (PST) 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.248.2; Sat, 12 Dec 2015 17:42:38 -0800 From: Paul Gortmaker To: CC: Paul Gortmaker , Richard Zhu , Lucas Stach , Bjorn Helgaas , , Subject: [PATCH 01/10] drivers/pci: make host/pci-imx6.c driver explicitly non-modular Date: Sat, 12 Dec 2015 20:41:48 -0500 Message-ID: <1449970917-12633-2-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1449970917-12633-1-git-send-email-paul.gortmaker@windriver.com> References: <1449970917-12633-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The Kconfig for this option is currently: config PCI_IMX6 bool "Freescale i.MX6 PCIe controller" ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modularity, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. An alternate init level might be worth considering at a later date. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and there wasn't a supplied ".remove" function to be called either. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Cc: Richard Zhu Cc: Lucas Stach Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker --- drivers/pci/host/pci-imx6.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index 22e8224126fd..ddd6a752b554 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -641,24 +641,20 @@ static const struct of_device_id imx6_pcie_of_match[] = { { .compatible = "fsl,imx6q-pcie", }, {}, }; -MODULE_DEVICE_TABLE(of, imx6_pcie_of_match); static struct platform_driver imx6_pcie_driver = { .driver = { .name = "imx6q-pcie", .of_match_table = imx6_pcie_of_match, + .suppress_bind_attrs = true, }, .shutdown = imx6_pcie_shutdown, }; -/* Freescale PCIe driver does not allow module unload */ +/* Freescale PCIe driver does not support module configuration */ static int __init imx6_pcie_init(void) { return platform_driver_probe(&imx6_pcie_driver, imx6_pcie_probe); } -module_init(imx6_pcie_init); - -MODULE_AUTHOR("Sean Cross "); -MODULE_DESCRIPTION("Freescale i.MX6 PCIe host controller driver"); -MODULE_LICENSE("GPL v2"); +device_initcall(imx6_pcie_init);