aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-02-13 12:32:03 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-21 00:46:53 -0400
commit34220909a26b7f7cfc71e88ce01856c2563fe1d4 (patch)
treedeea265e6356cfeca3f835d4f3ee3f403d37680e /drivers/pci
parenta2b5d877840f29b5fbb5f53b63dfcbf8bc0aea47 (diff)
PCI: remove pci_get_device_reverse
This removes the pci_get_device_reverse function as there should not be any need to walk pci devices backwards anymore. All users of this call are now gone from the tree, so it is safe to remove it. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/search.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index 1aabe3dbc7c3..a04c43ffce4c 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -360,46 +360,6 @@ pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from)
360} 360}
361 361
362/** 362/**
363 * pci_get_device_reverse - begin or continue searching for a PCI device by vendor/device id
364 * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids
365 * @device: PCI device id to match, or %PCI_ANY_ID to match all device ids
366 * @from: Previous PCI device found in search, or %NULL for new search.
367 *
368 * Iterates through the list of known PCI devices in the reverse order of
369 * pci_get_device.
370 * If a PCI device is found with a matching @vendor and @device, the reference
371 * count to the device is incremented and a pointer to its device structure
372 * is returned Otherwise, %NULL is returned. A new search is initiated by
373 * passing %NULL as the @from argument. Otherwise if @from is not %NULL,
374 * searches continue from next device on the global list. The reference
375 * count for @from is always decremented if it is not %NULL.
376 */
377struct pci_dev *
378pci_get_device_reverse(unsigned int vendor, unsigned int device, struct pci_dev *from)
379{
380 struct list_head *n;
381 struct pci_dev *dev;
382
383 WARN_ON(in_interrupt());
384 down_read(&pci_bus_sem);
385 n = from ? from->global_list.prev : pci_devices.prev;
386
387 while (n && (n != &pci_devices)) {
388 dev = pci_dev_g(n);
389 if ((vendor == PCI_ANY_ID || dev->vendor == vendor) &&
390 (device == PCI_ANY_ID || dev->device == device))
391 goto exit;
392 n = n->prev;
393 }
394 dev = NULL;
395exit:
396 dev = pci_dev_get(dev);
397 up_read(&pci_bus_sem);
398 pci_dev_put(from);
399 return dev;
400}
401
402/**
403 * pci_get_class - begin or continue searching for a PCI device by class 363 * pci_get_class - begin or continue searching for a PCI device by class
404 * @class: search for a PCI device with this class designation 364 * @class: search for a PCI device with this class designation
405 * @from: Previous PCI device found in search, or %NULL for new search. 365 * @from: Previous PCI device found in search, or %NULL for new search.
@@ -479,7 +439,6 @@ EXPORT_SYMBOL(pci_find_bus);
479EXPORT_SYMBOL(pci_find_next_bus); 439EXPORT_SYMBOL(pci_find_next_bus);
480/* For everyone */ 440/* For everyone */
481EXPORT_SYMBOL(pci_get_device); 441EXPORT_SYMBOL(pci_get_device);
482EXPORT_SYMBOL(pci_get_device_reverse);
483EXPORT_SYMBOL(pci_get_subsys); 442EXPORT_SYMBOL(pci_get_subsys);
484EXPORT_SYMBOL(pci_get_slot); 443EXPORT_SYMBOL(pci_get_slot);
485EXPORT_SYMBOL(pci_get_bus_and_slot); 444EXPORT_SYMBOL(pci_get_bus_and_slot);