aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/eisa/pci_eisa.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/drivers/eisa/pci_eisa.c b/drivers/eisa/pci_eisa.c
index ef5c3ec87432..6c3fca97d346 100644
--- a/drivers/eisa/pci_eisa.c
+++ b/drivers/eisa/pci_eisa.c
@@ -19,8 +19,7 @@
19/* There is only *one* pci_eisa device per machine, right ? */ 19/* There is only *one* pci_eisa device per machine, right ? */
20static struct eisa_root_device pci_eisa_root; 20static struct eisa_root_device pci_eisa_root;
21 21
22static int __init pci_eisa_init(struct pci_dev *pdev, 22static int __init pci_eisa_init(struct pci_dev *pdev)
23 const struct pci_device_id *ent)
24{ 23{
25 int rc, i; 24 int rc, i;
26 struct resource *res, *bus_res = NULL; 25 struct resource *res, *bus_res = NULL;
@@ -67,22 +66,26 @@ static int __init pci_eisa_init(struct pci_dev *pdev,
67 return 0; 66 return 0;
68} 67}
69 68
70static struct pci_device_id pci_eisa_pci_tbl[] = { 69/*
71 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 70 * We have to call pci_eisa_init_early() before pnpacpi_init()/isapnp_init().
72 PCI_CLASS_BRIDGE_EISA << 8, 0xffff00, 0 }, 71 * Otherwise pnp resource will get enabled early and could prevent eisa
73 { 0, } 72 * to be initialized.
74}; 73 * Also need to make sure pci_eisa_init_early() is called after
74 * x86/pci_subsys_init().
75 * So need to use subsys_initcall_sync with it.
76 */
77static int __init pci_eisa_init_early(void)
78{
79 struct pci_dev *dev = NULL;
80 int ret;
75 81
76static struct pci_driver __refdata pci_eisa_driver = { 82 for_each_pci_dev(dev)
77 .name = "pci_eisa", 83 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_EISA) {
78 .id_table = pci_eisa_pci_tbl, 84 ret = pci_eisa_init(dev);
79 .probe = pci_eisa_init, 85 if (ret)
80}; 86 return ret;
87 }
81 88
82static int __init pci_eisa_init_module (void) 89 return 0;
83{
84 return pci_register_driver (&pci_eisa_driver);
85} 90}
86 91subsys_initcall_sync(pci_eisa_init_early);
87device_initcall(pci_eisa_init_module);
88MODULE_DEVICE_TABLE(pci, pci_eisa_pci_tbl);