aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-02-21 19:06:08 -0500
committerDavid Vrabel <david.vrabel@citrix.com>2016-03-21 11:14:04 -0400
commite01dc539df3ada9061a1097224513236b5381349 (patch)
tree8a1cc933ed08c3b2cdef27433a66e3d2d9d8066d
parent46894f17af151f9f2050821aaa889a32c7cbd16f (diff)
drivers/xen: make platform-pci.c explicitly non-modular
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 <paul.gortmaker@windriver.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
-rw-r--r--drivers/xen/platform-pci.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index 3454973dc3bb..cf9666680c8c 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -2,6 +2,9 @@
2 * platform-pci.c 2 * platform-pci.c
3 * 3 *
4 * Xen platform PCI device driver 4 * Xen platform PCI device driver
5 *
6 * Authors: ssmith@xensource.com and stefano.stabellini@eu.citrix.com
7 *
5 * Copyright (c) 2005, Intel Corporation. 8 * Copyright (c) 2005, Intel Corporation.
6 * Copyright (c) 2007, XenSource Inc. 9 * Copyright (c) 2007, XenSource Inc.
7 * Copyright (c) 2010, Citrix 10 * Copyright (c) 2010, Citrix
@@ -24,7 +27,7 @@
24 27
25#include <linux/interrupt.h> 28#include <linux/interrupt.h>
26#include <linux/io.h> 29#include <linux/io.h>
27#include <linux/module.h> 30#include <linux/init.h>
28#include <linux/pci.h> 31#include <linux/pci.h>
29 32
30#include <xen/platform_pci.h> 33#include <xen/platform_pci.h>
@@ -36,10 +39,6 @@
36 39
37#define DRV_NAME "xen-platform-pci" 40#define DRV_NAME "xen-platform-pci"
38 41
39MODULE_AUTHOR("ssmith@xensource.com and stefano.stabellini@eu.citrix.com");
40MODULE_DESCRIPTION("Xen platform PCI device");
41MODULE_LICENSE("GPL");
42
43static unsigned long platform_mmio; 42static unsigned long platform_mmio;
44static unsigned long platform_mmio_alloc; 43static unsigned long platform_mmio_alloc;
45static unsigned long platform_mmiolen; 44static unsigned long platform_mmiolen;
@@ -101,8 +100,8 @@ static int platform_pci_resume(struct pci_dev *pdev)
101 return 0; 100 return 0;
102} 101}
103 102
104static int platform_pci_init(struct pci_dev *pdev, 103static int platform_pci_probe(struct pci_dev *pdev,
105 const struct pci_device_id *ent) 104 const struct pci_device_id *ent)
106{ 105{
107 int i, ret; 106 int i, ret;
108 long ioaddr; 107 long ioaddr;
@@ -181,20 +180,17 @@ static struct pci_device_id platform_pci_tbl[] = {
181 {0,} 180 {0,}
182}; 181};
183 182
184MODULE_DEVICE_TABLE(pci, platform_pci_tbl);
185
186static struct pci_driver platform_driver = { 183static struct pci_driver platform_driver = {
187 .name = DRV_NAME, 184 .name = DRV_NAME,
188 .probe = platform_pci_init, 185 .probe = platform_pci_probe,
189 .id_table = platform_pci_tbl, 186 .id_table = platform_pci_tbl,
190#ifdef CONFIG_PM 187#ifdef CONFIG_PM
191 .resume_early = platform_pci_resume, 188 .resume_early = platform_pci_resume,
192#endif 189#endif
193}; 190};
194 191
195static int __init platform_pci_module_init(void) 192static int __init platform_pci_init(void)
196{ 193{
197 return pci_register_driver(&platform_driver); 194 return pci_register_driver(&platform_driver);
198} 195}
199 196device_initcall(platform_pci_init);
200module_init(platform_pci_module_init);