Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362297
b: refs/heads/master
c: c5fb301
h: refs/heads/master
i:
  362295: ef342ca
v: v3
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed Apr 1, 2013
1 parent e219ff5 commit 3eda276
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2cfda637e29ce9e3df31b59f64516b2e571cc985
refs/heads/master: c5fb301ae83bec6892e54984e6ec765c47df8e10
39 changes: 21 additions & 18 deletions trunk/drivers/eisa/pci_eisa.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
/* There is only *one* pci_eisa device per machine, right ? */
static struct eisa_root_device pci_eisa_root;

static int __init pci_eisa_init(struct pci_dev *pdev,
const struct pci_device_id *ent)
static int __init pci_eisa_init(struct pci_dev *pdev)
{
int rc, i;
struct resource *res, *bus_res = NULL;
Expand Down Expand Up @@ -67,22 +66,26 @@ static int __init pci_eisa_init(struct pci_dev *pdev,
return 0;
}

static struct pci_device_id pci_eisa_pci_tbl[] = {
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_BRIDGE_EISA << 8, 0xffff00, 0 },
{ 0, }
};
/*
* We have to call pci_eisa_init_early() before pnpacpi_init()/isapnp_init().
* Otherwise pnp resource will get enabled early and could prevent eisa
* to be initialized.
* Also need to make sure pci_eisa_init_early() is called after
* x86/pci_subsys_init().
* So need to use subsys_initcall_sync with it.
*/
static int __init pci_eisa_init_early(void)
{
struct pci_dev *dev = NULL;
int ret;

static struct pci_driver __refdata pci_eisa_driver = {
.name = "pci_eisa",
.id_table = pci_eisa_pci_tbl,
.probe = pci_eisa_init,
};
for_each_pci_dev(dev)
if ((dev->class >> 8) == PCI_CLASS_BRIDGE_EISA) {
ret = pci_eisa_init(dev);
if (ret)
return ret;
}

static int __init pci_eisa_init_module (void)
{
return pci_register_driver (&pci_eisa_driver);
return 0;
}

device_initcall(pci_eisa_init_module);
MODULE_DEVICE_TABLE(pci, pci_eisa_pci_tbl);
subsys_initcall_sync(pci_eisa_init_early);

0 comments on commit 3eda276

Please sign in to comment.