]> Git Repo - linux.git/commitdiff
drivers/xen: make platform-pci.c explicitly non-modular
authorPaul Gortmaker <[email protected]>
Mon, 22 Feb 2016 00:06:08 +0000 (19:06 -0500)
committerDavid Vrabel <[email protected]>
Mon, 21 Mar 2016 15:14:04 +0000 (15:14 +0000)
The Kconfig currently controlling compilation of this code is:

arch/x86/xen/Kconfig:config XEN_PVHVM
arch/x86/xen/Kconfig:   def_bool y

...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.

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.

In removing "module" from the init fcn name, we observe a namespace
collision with the probe function, so we use "probe" in the name of
the probe function, and "init" in the registration fcn, as per
standard convention, as suggested by Stefano.

Signed-off-by: Paul Gortmaker <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Signed-off-by: David Vrabel <[email protected]>
drivers/xen/platform-pci.c

index 3454973dc3bbd6c4d2c32e037e6e51388cca6395..cf9666680c8c0e57225047939d169228724a7ab6 100644 (file)
@@ -2,6 +2,9 @@
  * platform-pci.c
  *
  * Xen platform PCI device driver
+ *
+ *
  * Copyright (c) 2005, Intel Corporation.
  * Copyright (c) 2007, XenSource Inc.
  * Copyright (c) 2010, Citrix
@@ -24,7 +27,7 @@
 
 #include <linux/interrupt.h>
 #include <linux/io.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/pci.h>
 
 #include <xen/platform_pci.h>
 
 #define DRV_NAME    "xen-platform-pci"
 
-MODULE_AUTHOR("[email protected] and [email protected]");
-MODULE_DESCRIPTION("Xen platform PCI device");
-MODULE_LICENSE("GPL");
-
 static unsigned long platform_mmio;
 static unsigned long platform_mmio_alloc;
 static unsigned long platform_mmiolen;
@@ -101,8 +100,8 @@ static int platform_pci_resume(struct pci_dev *pdev)
        return 0;
 }
 
-static int platform_pci_init(struct pci_dev *pdev,
-                            const struct pci_device_id *ent)
+static int platform_pci_probe(struct pci_dev *pdev,
+                             const struct pci_device_id *ent)
 {
        int i, ret;
        long ioaddr;
@@ -181,20 +180,17 @@ static struct pci_device_id platform_pci_tbl[] = {
        {0,}
 };
 
-MODULE_DEVICE_TABLE(pci, platform_pci_tbl);
-
 static struct pci_driver platform_driver = {
        .name =           DRV_NAME,
-       .probe =          platform_pci_init,
+       .probe =          platform_pci_probe,
        .id_table =       platform_pci_tbl,
 #ifdef CONFIG_PM
        .resume_early =   platform_pci_resume,
 #endif
 };
 
-static int __init platform_pci_module_init(void)
+static int __init platform_pci_init(void)
 {
        return pci_register_driver(&platform_driver);
 }
-
-module_init(platform_pci_module_init);
+device_initcall(platform_pci_init);
This page took 0.056254 seconds and 4 git commands to generate.