diff options
Diffstat (limited to 'drivers/pci/search.c')
-rw-r--r-- | drivers/pci/search.c | 41 |
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 | */ | ||
377 | struct pci_dev * | ||
378 | pci_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; | ||
395 | exit: | ||
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); | |||
479 | EXPORT_SYMBOL(pci_find_next_bus); | 439 | EXPORT_SYMBOL(pci_find_next_bus); |
480 | /* For everyone */ | 440 | /* For everyone */ |
481 | EXPORT_SYMBOL(pci_get_device); | 441 | EXPORT_SYMBOL(pci_get_device); |
482 | EXPORT_SYMBOL(pci_get_device_reverse); | ||
483 | EXPORT_SYMBOL(pci_get_subsys); | 442 | EXPORT_SYMBOL(pci_get_subsys); |
484 | EXPORT_SYMBOL(pci_get_slot); | 443 | EXPORT_SYMBOL(pci_get_slot); |
485 | EXPORT_SYMBOL(pci_get_bus_and_slot); | 444 | EXPORT_SYMBOL(pci_get_bus_and_slot); |