PCI: add pci_get_domain_bus_and_slot function
authorAndrew Patterson <andrew.patterson@hp.com>
Mon, 12 Oct 2009 19:14:00 +0000 (13:14 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 4 Nov 2009 21:06:36 +0000 (13:06 -0800)
commit3c299dc22635e500214707aa28be119ff2b3901c
tree6d9cb3710c674639041ead3247e179fa82dcaf35
parentbc577d2bb98cc44371287fce3e892d26ad4050a8
PCI: add pci_get_domain_bus_and_slot function

Added the pci_get_domain_and_slot_function which is analogous to
pci_get_bus_and_slot. It returns a pci_dev given a domain (segment) number,
bus number, and devnr. Like pci_get_bus_and_slot,
pci_get_domain_bus_and_slot holds a reference to the returned pci_dev.

Converted pci_get_bus_and_slot to a wrapper that calls
pci_get_domain_bus_and_slot with the domain hard-coded to 0.

This routine was patterned off code suggested by Bjorn Helgaas.

Acked-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/search.c
include/linux/pci.h