/* Iterates through the list of known PCI busses. A new search is initiated by passing NULL as the @from argument. Otherwise if @from is not NULL, searches continue from next device on the global list.  */
struct pci_bus* pci_find_next_bus(const struct pci_bus *from)
/* Iterates through the list of known PCI busses. A new search is initiated by passing NULL as the @from argument. Otherwise if @from is not NULL, searches continue from next device on the global list.  */
struct pci_bus* pci_find_next_bus(const struct pci_bus *from)
{
	struct list_head *n;
	struct pci_bus *b = NULL;
	WARN_ON(in_interrupt());
	down_read(&pci_bus_sem);
	n = from ? from->node.next : pci_root_buses.next;
	if (n != &pci_root_buses)
		b = pci_bus_b(n);
	up_read(&pci_bus_sem);
	return b;
}