Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116723
b: refs/heads/master
c: 201de56
h: refs/heads/master
i:
  116721: 3e84da3
  116719: bfc0387
v: v3
  • Loading branch information
Zhao, Yu authored and Jesse Barnes committed Oct 20, 2008
1 parent 7d583f4 commit a05ed11
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 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: 280c73d3691fb182fa55b0160737c2c0feb79471
refs/heads/master: 201de56eb22f1ff3f36804bc70cbff220b50f067
27 changes: 20 additions & 7 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,11 @@ static int pci_setup_device(struct pci_dev * dev)
return 0;
}

static void pci_release_capabilities(struct pci_dev *dev)
{
pci_vpd_release(dev);
}

/**
* pci_release_dev - free a pci device structure when all users of it are finished.
* @dev: device that's been disconnected
Expand All @@ -854,7 +859,7 @@ static void pci_release_dev(struct device *dev)
struct pci_dev *pci_dev;

pci_dev = to_pci_dev(dev);
pci_vpd_release(pci_dev);
pci_release_capabilities(pci_dev);
kfree(pci_dev);
}

Expand Down Expand Up @@ -935,8 +940,6 @@ struct pci_dev *alloc_pci_dev(void)

INIT_LIST_HEAD(&dev->bus_list);

pci_msi_init_pci_dev(dev);

return dev;
}
EXPORT_SYMBOL(alloc_pci_dev);
Expand Down Expand Up @@ -1009,11 +1012,21 @@ static struct pci_dev *pci_scan_device(struct pci_bus *bus, int devfn)
return NULL;
}

pci_vpd_pci22_init(dev);

return dev;
}

static void pci_init_capabilities(struct pci_dev *dev)
{
/* MSI/MSI-X list */
pci_msi_init_pci_dev(dev);

/* Power Management */
pci_pm_init(dev);

/* Vital Product Data */
pci_vpd_pci22_init(dev);
}

void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
{
device_initialize(&dev->dev);
Expand All @@ -1030,8 +1043,8 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
/* Fix up broken headers */
pci_fixup_device(pci_fixup_header, dev);

/* Initialize power management of the device */
pci_pm_init(dev);
/* Initialize various capabilities */
pci_init_capabilities(dev);

/*
* Add the device to our list of discovered devices
Expand Down

0 comments on commit a05ed11

Please sign in to comment.