Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1469723

[PATCH 1/9] PCI: PCIe dpc: make it explicitly non-modular

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject [PATCH 1/9] PCI: PCIe dpc: make it explicitly non-modular
Date 2016-08-24 23:10 +0200
Message-ID <s9NAS-7TC-19@gated-at.bofh.it> (permalink)
References <s9Nrc-7Bg-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The Kconfig currently controlling compilation of this code is:

drivers/pci/pcie/Kconfig:config PCIE_DPC
drivers/pci/pcie/Kconfig:       bool "PCIe Downstream Port Containment 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 translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

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: Bjorn Helgaas <bhelgaas@google.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pci/pcie/pcie-dpc.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index 250f87861786..9811b14d9ad8 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -1,5 +1,7 @@
 /*
  * PCI Express Downstream Port Containment services driver
+ * Author: Keith Busch <keith.busch@intel.com>
+ *
  * Copyright (C) 2016 Intel Corp.
  *
  * This file is subject to the terms and conditions of the GNU General Public
@@ -9,7 +11,7 @@
 
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/pcieport_if.h>
 
@@ -143,16 +145,4 @@ static int __init dpc_service_init(void)
 {
 	return pcie_port_service_register(&dpcdriver);
 }
-
-static void __exit dpc_service_exit(void)
-{
-	pcie_port_service_unregister(&dpcdriver);
-}
-
-MODULE_DESCRIPTION("PCI Express Downstream Port Containment driver");
-MODULE_AUTHOR("Keith Busch <keith.busch@intel.com>");
-MODULE_LICENSE("GPL");
-MODULE_VERSION("0.1");
-
-module_init(dpc_service_init);
-module_exit(dpc_service_exit);
+device_initcall(dpc_service_init);
-- 
2.8.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/9] PCI: final demodularization of non-modular code Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-08-24 23:00 +0200
  [PATCH 8/9] PCI: hotplug_core: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-08-24 23:00 +0200
  [PATCH 9/9] PCI: hotplug: make PCIe core code explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-08-24 23:00 +0200
  [PATCH 7/9] PCI: PCIe xilinx-nwl: make host code explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-08-24 23:00 +0200
  [PATCH 3/9] PCI: PCIe aerdrv: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-08-24 23:10 +0200
  [PATCH 2/9] PCI: PCIe pme: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-08-24 23:10 +0200
  [PATCH 1/9] PCI: PCIe dpc: make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-08-24 23:10 +0200
  Re: [PATCH 0/9] PCI: final demodularization of non-modular code Bjorn Helgaas <helgaas@kernel.org> - 2016-08-25 00:40 +0200

csiph-web