aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorAndrew Patterson <andrew.patterson@hp.com>2009-10-12 15:14:00 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-04 16:06:36 -0500
commit3c299dc22635e500214707aa28be119ff2b3901c (patch)
tree6d9cb3710c674639041ead3247e179fa82dcaf35 /include/linux/pci.h
parentbc577d2bb98cc44371287fce3e892d26ad4050a8 (diff)
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>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9d646e60cae0..86c31ac454d1 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -636,7 +636,13 @@ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device,
636 unsigned int ss_vendor, unsigned int ss_device, 636 unsigned int ss_vendor, unsigned int ss_device,
637 struct pci_dev *from); 637 struct pci_dev *from);
638struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); 638struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn);
639struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); 639struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus,
640 unsigned int devfn);
641static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
642 unsigned int devfn)
643{
644 return pci_get_domain_bus_and_slot(0, bus, devfn);
645}
640struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); 646struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from);
641int pci_dev_present(const struct pci_device_id *ids); 647int pci_dev_present(const struct pci_device_id *ids);
642 648