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


Groups > linux.kernel > #1469717

[PATCH 3/9] PCI: PCIe aerdrv: make it explicitly non-modular

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject [PATCH 3/9] PCI: PCIe aerdrv: make it explicitly non-modular
Date 2016-08-24 23:10 +0200
Message-ID <s9NAR-7TC-1@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 Makefile fragments currently controlling compilation of this code are:

obj-$(CONFIG_PCIEAER) += aerdriver.o
aerdriver-objs := aerdrv_errprint.o aerdrv_core.o aerdrv.o

The Kconfig currently controlling compilation of this code is:

drivers/pci/pcie/aer/Kconfig:config PCIEAER
drivers/pci/pcie/aer/Kconfig:   bool "Root Port Advanced Error Reporting 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 don't replace module.h with init.h since the file already has that.

We also delete the MODULE_LICENSE tag etc since all that information
is already contained earlier in the file.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Tom Long Nguyen <tom.l.nguyen@intel.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pci/pcie/aer/aerdrv.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index 48d21e0edd56..49805a48b81c 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -15,7 +15,6 @@
  *
  */
 
-#include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/pci-acpi.h>
 #include <linux/sched.h>
@@ -37,9 +36,6 @@
 #define DRIVER_VERSION "v1.0"
 #define DRIVER_AUTHOR "tom.l.nguyen@intel.com"
 #define DRIVER_DESC "Root Port Advanced Error Reporting Driver"
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL");
 
 static int aer_probe(struct pcie_device *dev);
 static void aer_remove(struct pcie_device *dev);
@@ -417,16 +413,4 @@ static int __init aer_service_init(void)
 		return -ENXIO;
 	return pcie_port_service_register(&aerdriver);
 }
-
-/**
- * aer_service_exit - unregister AER root service driver
- *
- * Invoked when AER root service driver is unloaded.
- */
-static void __exit aer_service_exit(void)
-{
-	pcie_port_service_unregister(&aerdriver);
-}
-
-module_init(aer_service_init);
-module_exit(aer_service_exit);
+device_initcall(aer_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