aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorYu Zhao <yu.zhao@intel.com>2008-11-21 13:38:21 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 14:12:59 -0500
commit6a49d8120021897e139641062236215aac5d220e (patch)
tree894221dce19f76f3232c1f7b9801d1786aabeaf9 /drivers/pci
parent999da9fd489cd9774a89122940190376e19b21ce (diff)
PCI: enhance pci_ari_enabled()
Change parameter of pci_ari_enabled() from 'pci_dev' to 'pci_bus'. ARI forwarding on the bridge mostly concerns the subordinate devices rather than the bridge itself. So this change will make the function easier to use. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 7242b511a93f..392388468f6f 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -165,13 +165,13 @@ struct pci_slot_attribute {
165extern void pci_enable_ari(struct pci_dev *dev); 165extern void pci_enable_ari(struct pci_dev *dev);
166/** 166/**
167 * pci_ari_enabled - query ARI forwarding status 167 * pci_ari_enabled - query ARI forwarding status
168 * @dev: the PCI device 168 * @bus: the PCI bus
169 * 169 *
170 * Returns 1 if ARI forwarding is enabled, or 0 if not enabled; 170 * Returns 1 if ARI forwarding is enabled, or 0 if not enabled;
171 */ 171 */
172static inline int pci_ari_enabled(struct pci_dev *dev) 172static inline int pci_ari_enabled(struct pci_bus *bus)
173{ 173{
174 return dev->ari_enabled; 174 return bus->self && bus->self->ari_enabled;
175} 175}
176 176
177#endif /* DRIVERS_PCI_H */ 177#endif /* DRIVERS_PCI_H */