*** linux-2.6.10/drivers/pci/search.c 2004-12-24 22:33:48.000000000 +0100 --- linux-2.6.10custom/drivers/pci/search.c 2004-12-31 14:39:36.010105580 +0100 *************** *** 378,383 **** --- 378,405 ---- } EXPORT_SYMBOL(pci_dev_present); + struct pci_dev * + pci_find_class(unsigned int class, const struct pci_dev *from) + { + struct list_head *n; + struct pci_dev *dev; + + spin_lock(&pci_bus_lock); + n = from ? from->global_list.next : pci_devices.next; + + while (n && (n != &pci_devices)) { + dev = pci_dev_g(n); + if (dev->class == class) + goto exit; + n = n->next; + } + dev = NULL; + exit: + spin_unlock(&pci_bus_lock); + return dev; + } + EXPORT_SYMBOL(pci_find_class); + EXPORT_SYMBOL(pci_find_bus); EXPORT_SYMBOL(pci_find_device); EXPORT_SYMBOL(pci_find_device_reverse);