aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/pci/search.c41
-rw-r--r--include/linux/pci.h10
2 files changed, 0 insertions, 51 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);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index b39f2abbea17..39ecf48ffa3b 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -517,9 +517,6 @@ struct pci_bus *pci_find_next_bus(const struct pci_bus *from);
517 517
518struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, 518struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device,
519 struct pci_dev *from); 519 struct pci_dev *from);
520struct pci_dev *pci_get_device_reverse(unsigned int vendor, unsigned int device,
521 struct pci_dev *from);
522
523struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, 520struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device,
524 unsigned int ss_vendor, unsigned int ss_device, 521 unsigned int ss_vendor, unsigned int ss_device,
525 struct pci_dev *from); 522 struct pci_dev *from);
@@ -791,13 +788,6 @@ static inline struct pci_dev *pci_get_device(unsigned int vendor,
791 return NULL; 788 return NULL;
792} 789}
793 790
794static inline struct pci_dev *pci_get_device_reverse(unsigned int vendor,
795 unsigned int device,
796 struct pci_dev *from)
797{
798 return NULL;
799}
800
801static inline struct pci_dev *pci_get_subsys(unsigned int vendor, 791static inline struct pci_dev *pci_get_subsys(unsigned int vendor,
802 unsigned int device, 792 unsigned int device,
803 unsigned int ss_vendor, 793 unsigned int ss_vendor,