diff options
-rw-r--r-- | drivers/pci/search.c | 38 | ||||
-rw-r--r-- | include/linux/pci.h | 1 |
2 files changed, 0 insertions, 39 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index b2653c4afe9e..ff98eaddaa73 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -358,43 +358,6 @@ exit: | |||
358 | } | 358 | } |
359 | 359 | ||
360 | /** | 360 | /** |
361 | * pci_find_device_reverse - begin or continue searching for a PCI device by vendor/device id | ||
362 | * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids | ||
363 | * @device: PCI device id to match, or %PCI_ANY_ID to match all device ids | ||
364 | * @from: Previous PCI device found in search, or %NULL for new search. | ||
365 | * | ||
366 | * Iterates through the list of known PCI devices in the reverse order of | ||
367 | * pci_find_device(). | ||
368 | * If a PCI device is found with a matching @vendor and @device, a pointer to | ||
369 | * its device structure is returned. Otherwise, %NULL is returned. | ||
370 | * A new search is initiated by passing %NULL as the @from argument. | ||
371 | * Otherwise if @from is not %NULL, searches continue from previous device | ||
372 | * on the global list. | ||
373 | */ | ||
374 | struct pci_dev * | ||
375 | pci_find_device_reverse(unsigned int vendor, unsigned int device, const struct pci_dev *from) | ||
376 | { | ||
377 | struct list_head *n; | ||
378 | struct pci_dev *dev; | ||
379 | |||
380 | WARN_ON(in_interrupt()); | ||
381 | down_read(&pci_bus_sem); | ||
382 | n = from ? from->global_list.prev : pci_devices.prev; | ||
383 | |||
384 | while (n && (n != &pci_devices)) { | ||
385 | dev = pci_dev_g(n); | ||
386 | if ((vendor == PCI_ANY_ID || dev->vendor == vendor) && | ||
387 | (device == PCI_ANY_ID || dev->device == device)) | ||
388 | goto exit; | ||
389 | n = n->prev; | ||
390 | } | ||
391 | dev = NULL; | ||
392 | exit: | ||
393 | up_read(&pci_bus_sem); | ||
394 | return dev; | ||
395 | } | ||
396 | |||
397 | /** | ||
398 | * pci_get_class - begin or continue searching for a PCI device by class | 361 | * pci_get_class - begin or continue searching for a PCI device by class |
399 | * @class: search for a PCI device with this class designation | 362 | * @class: search for a PCI device with this class designation |
400 | * @from: Previous PCI device found in search, or %NULL for new search. | 363 | * @from: Previous PCI device found in search, or %NULL for new search. |
@@ -469,7 +432,6 @@ EXPORT_SYMBOL(pci_dev_present); | |||
469 | EXPORT_SYMBOL(pci_find_present); | 432 | EXPORT_SYMBOL(pci_find_present); |
470 | 433 | ||
471 | EXPORT_SYMBOL(pci_find_device); | 434 | EXPORT_SYMBOL(pci_find_device); |
472 | EXPORT_SYMBOL(pci_find_device_reverse); | ||
473 | EXPORT_SYMBOL(pci_find_slot); | 435 | EXPORT_SYMBOL(pci_find_slot); |
474 | /* For boot time work */ | 436 | /* For boot time work */ |
475 | EXPORT_SYMBOL(pci_find_bus); | 437 | EXPORT_SYMBOL(pci_find_bus); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 79856b3c714a..23d2a37f3c9f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -469,7 +469,6 @@ extern void pci_sort_breadthfirst(void); | |||
469 | /* Generic PCI functions exported to card drivers */ | 469 | /* Generic PCI functions exported to card drivers */ |
470 | 470 | ||
471 | struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 471 | struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
472 | struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); | ||
473 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 472 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); |
474 | int pci_find_capability (struct pci_dev *dev, int cap); | 473 | int pci_find_capability (struct pci_dev *dev, int cap); |
475 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 474 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |