On Tue, May 14, 2013 at 9:51 AM, Jiang Liu <[email protected]> wrote: > Introduce hotplug-safe PCI bus iterators as below, which hold a > reference on the returned PCI bus object. > bool pci_bus_exists(int domain, int busnr); > struct pci_bus *pci_get_bus(int domain, int busnr); > struct pci_bus *pci_get_next_bus(struct pci_bus *from); > struct pci_bus *pci_get_next_root_bus(struct pci_bus *from); > #define for_each_pci_bus(b) for (b = NULL; (b = pci_get_next_bus(b)); ) > #define for_each_pci_root_bus(b) \ > for (b = NULL; (b = pci_get_next_root_bus(b)); ) > > The long-term goal is to remove hotplug-unsafe pci_find_bus(), > pci_find_next_bus() and the global pci_root_buses list. > > These new interfaces may be a littler slower than existing interfaces, > but it should be acceptable because they are not used on hot paths. > > Signed-off-by: Jiang Liu <[email protected]> > Cc: [email protected] > Cc: [email protected]
Acked-by: Yinghai Lu <[email protected]> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

