aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2009-10-12 07:48:43 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-10-12 09:42:04 -0400
commit8d86fb2c80ec376b35ae64ac858d406ae1d42a3f (patch)
tree66ae9941d9f9785fd75365c357b706ff2d31f67a /drivers
parente0fc7e0b4b5e69616f10a894ab9afff3c64be74e (diff)
Rename pci_init() to pci_apply_final_quirks(), move it to quirks.c
This function may have done more in the past, but all it does now is apply the PCI_FIXUP_FINAL quirks. So name it sensibly and put it where it belongs. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci.c13
-rw-r--r--drivers/pci/quirks.c13
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6edecff0b419..2b575cfb4b09 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2719,17 +2719,6 @@ int __attribute__ ((weak)) pci_ext_cfg_avail(struct pci_dev *dev)
2719 return 1; 2719 return 1;
2720} 2720}
2721 2721
2722static int __devinit pci_init(void)
2723{
2724 struct pci_dev *dev = NULL;
2725
2726 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
2727 pci_fixup_device(pci_fixup_final, dev);
2728 }
2729
2730 return 0;
2731}
2732
2733static int __init pci_setup(char *str) 2722static int __init pci_setup(char *str)
2734{ 2723{
2735 while (str) { 2724 while (str) {
@@ -2767,8 +2756,6 @@ static int __init pci_setup(char *str)
2767} 2756}
2768early_param("pci", pci_setup); 2757early_param("pci", pci_setup);
2769 2758
2770device_initcall(pci_init);
2771
2772EXPORT_SYMBOL(pci_reenable_device); 2759EXPORT_SYMBOL(pci_reenable_device);
2773EXPORT_SYMBOL(pci_enable_device_io); 2760EXPORT_SYMBOL(pci_enable_device_io);
2774EXPORT_SYMBOL(pci_enable_device_mem); 2761EXPORT_SYMBOL(pci_enable_device_mem);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 6099facecd79..014227540ac9 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2572,6 +2572,19 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
2572 } 2572 }
2573 pci_do_fixups(dev, start, end); 2573 pci_do_fixups(dev, start, end);
2574} 2574}
2575
2576static int __devinit pci_apply_final_quirks(void)
2577{
2578 struct pci_dev *dev = NULL;
2579
2580 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
2581 pci_fixup_device(pci_fixup_final, dev);
2582 }
2583
2584 return 0;
2585}
2586
2587device_initcall(pci_apply_final_quirks);
2575#else 2588#else
2576void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) {} 2589void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) {}
2577#endif 2590#endif