PCI: Move pci_ari_enabled() to global header
pci_ari_enabled() is useful outside of drivers/pci, particularly for deriving INTx routing via ACPI _PRT, so move it to the global header. Also convert to bool return. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Don Dutile <ddutile@redhat.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Bjorn Helgaas

parent
247de69434
commit
19bdb6e4ec
@@ -1905,4 +1905,15 @@ static inline bool pci_is_dev_assigned(struct pci_dev *pdev)
|
||||
{
|
||||
return (pdev->dev_flags & PCI_DEV_FLAGS_ASSIGNED) == PCI_DEV_FLAGS_ASSIGNED;
|
||||
}
|
||||
|
||||
/**
|
||||
* pci_ari_enabled - query ARI forwarding status
|
||||
* @bus: the PCI bus
|
||||
*
|
||||
* Returns true if ARI forwarding is enabled.
|
||||
*/
|
||||
static inline bool pci_ari_enabled(struct pci_bus *bus)
|
||||
{
|
||||
return bus->self && bus->self->ari_enabled;
|
||||
}
|
||||
#endif /* LINUX_PCI_H */
|
||||
|
Reference in New Issue
Block a user