linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Tom Long Nguyen <tom.l.nguyen@intel.com>,
	<linux-pci@vger.kernel.org>
Subject: [PATCH 4/8] PCI: portdrv: make it explicitly non-modular
Date: Mon, 22 Aug 2016 17:59:44 -0400	[thread overview]
Message-ID: <20160822215948.27251-5-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <20160822215948.27251-1-paul.gortmaker@windriver.com>

The Makefile/Kconfig currently controlling compilation of this code is:

pcieportdrv-y               := portdrv_core.o portdrv_pci.o portdrv_bus.o
obj-$(CONFIG_PCIEPORTBUS)   += pcieportdrv.o

drivers/pci/pcie/Kconfig:config PCIEPORTBUS
drivers/pci/pcie/Kconfig:       bool "PCI Express Port Bus 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.

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
is already contained earlier up 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/portdrv_pci.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 70d7ad8c6d17..85f7afcd6227 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -6,7 +6,6 @@
  * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com)
  */
 
-#include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -27,9 +26,6 @@
 #define DRIVER_VERSION "v1.0"
 #define DRIVER_AUTHOR "tom.l.nguyen@intel.com"
 #define DRIVER_DESC "PCIe Port Bus Driver"
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL");
 
 /* If this switch is set, PCIe port native services should not be enabled. */
 bool pcie_ports_disabled;
@@ -341,7 +337,6 @@ static const struct pci_device_id port_pci_ids[] = { {
 	PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0),
 	}, { /* end: all zeroes */ }
 };
-MODULE_DEVICE_TABLE(pci, port_pci_ids);
 
 static const struct pci_error_handlers pcie_portdrv_err_handler = {
 	.error_detected = pcie_portdrv_error_detected,
@@ -406,5 +401,4 @@ static int __init pcie_portdrv_init(void)
  out:
 	return retval;
 }
-
-module_init(pcie_portdrv_init);
+device_initcall(pcie_portdrv_init);
-- 
2.8.4

  parent reply	other threads:[~2016-08-22 22:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22 21:59 [PATCH 0/8] PCI: more trivial demodularization of builtin code Paul Gortmaker
2016-08-22 21:59 ` [PATCH 1/8] PCI: altera: make msi explicitly non-modular Paul Gortmaker
2016-08-22 21:59 ` [PATCH 2/8] PCI: altera: make it " Paul Gortmaker
2016-08-22 21:59 ` [PATCH 3/8] PCI: imx6: " Paul Gortmaker
2016-08-22 21:59 ` Paul Gortmaker [this message]
2016-08-22 21:59 ` [PATCH 5/8] PCI: spear13xx: " Paul Gortmaker
2016-08-22 21:59 ` [PATCH 6/8] PCI: designware: make host support " Paul Gortmaker
2016-08-22 21:59 ` [PATCH 7/8] PCI: exynos: " Paul Gortmaker
2016-08-24 19:15   ` Krzysztof Kozlowski
2016-08-22 21:59 ` [PATCH 8/8] PCI: generic: make host-common " Paul Gortmaker
2016-08-23 20:48 ` [PATCH 0/8] PCI: more trivial demodularization of builtin code Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160822215948.27251-5-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tom.l.nguyen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).