From: Yu Zhao Date: Fri, 21 Nov 2008 18:38:21 +0000 (+0800) Subject: PCI: enhance pci_ari_enabled() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6a49d8120021897e139641062236215aac5d220e;p=linux-beck.git 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 Signed-off-by: Jesse Barnes --- 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 { extern void pci_enable_ari(struct pci_dev *dev); /** * pci_ari_enabled - query ARI forwarding status - * @dev: the PCI device + * @bus: the PCI bus * * Returns 1 if ARI forwarding is enabled, or 0 if not enabled; */ -static inline int pci_ari_enabled(struct pci_dev *dev) +static inline int pci_ari_enabled(struct pci_bus *bus) { - return dev->ari_enabled; + return bus->self && bus->self->ari_enabled; } #endif /* DRIVERS_PCI_H */