aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/search.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:16:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:16:53 -0400
commita3415dc34f4a615a904852e7a9d0cc2877007e9e (patch)
tree0072b4b3f266c03220ffb2a9b329b2591f2a8e19 /drivers/pci/search.c
parentb4d0b08a4c3947c6ac004c9d83154ec5999c1861 (diff)
parent05a34f51ba451c65773ad6f1acf4cc089cc474d8 (diff)
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (32 commits) PCI hotplug: fix logic in Compaq hotplug controller bus speed setup PCI: don't export linux/io.h from pci.h PCI: PCI_QUIRKS depends on PCI PCI hotplug: pciehp: poll data link layer link active PCI hotplug: pciehp: fix possible memory leak in pcie_init PCI: Workaround invalid P2P bridge bus numbers PCI Hotplug: fakephp: add duplicate slot name debugging PCI: Hotplug core: remove 'name' PCI: shcphp: remove 'name' parameter PCI: SGI Hotplug: stop managing bss_hotplug_slot->name PCI: rpaphp: kmalloc/kfree slot->name directly PCI: pciehp: remove 'name' parameter PCI: ibmphp: stop managing hotplug_slot->name PCI: fakephp: remove 'name' parameter PCI, PCI Hotplug: introduce slot_name helpers PCI: cpqphp: stop managing hotplug_slot->name PCI: cpci_hotplug: stop managing hotplug_slot->name PCI: acpiphp: remove 'name' parameter PCI: prevent duplicate slot names PCI Hotplug: serialize pci_hp_register and pci_hp_deregister ...
Diffstat (limited to 'drivers/pci/search.c')
-rw-r--r--drivers/pci/search.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index 4edfc4731bd4..5af8bd538149 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -166,6 +166,7 @@ struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device,
166{ 166{
167 struct pci_dev *pdev; 167 struct pci_dev *pdev;
168 168
169 pci_dev_get(from);
169 pdev = pci_get_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from); 170 pdev = pci_get_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from);
170 pci_dev_put(pdev); 171 pci_dev_put(pdev);
171 return pdev; 172 return pdev;
@@ -270,12 +271,8 @@ static struct pci_dev *pci_get_dev_by_id(const struct pci_device_id *id,
270 struct pci_dev *pdev = NULL; 271 struct pci_dev *pdev = NULL;
271 272
272 WARN_ON(in_interrupt()); 273 WARN_ON(in_interrupt());
273 if (from) { 274 if (from)
274 /* FIXME 275 dev_start = &from->dev;
275 * take the cast off, when bus_find_device is made const.
276 */
277 dev_start = (struct device *)&from->dev;
278 }
279 dev = bus_find_device(&pci_bus_type, dev_start, (void *)id, 276 dev = bus_find_device(&pci_bus_type, dev_start, (void *)id,
280 match_pci_dev_by_id); 277 match_pci_dev_by_id);
281 if (dev) 278 if (dev)