]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PCI: Move pci_ari_enabled() to global header
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 26 May 2015 21:11:44 +0000 (15:11 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 29 May 2015 22:14:17 +0000 (17:14 -0500)
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>
drivers/pci/pci.h
include/linux/pci.h

index 9bd762c237abe2fd679e8c7163947c7a0453c46b..c1b2a433ca04e31b44d8f4ecc031cc8a281c67eb 100644 (file)
@@ -216,17 +216,6 @@ void __pci_bus_assign_resources(const struct pci_bus *bus,
                                struct list_head *fail_head);
 bool pci_bus_clip_resource(struct pci_dev *dev, int idx);
 
-/**
- * pci_ari_enabled - query ARI forwarding status
- * @bus: the PCI bus
- *
- * Returns 1 if ARI forwarding is enabled, or 0 if not enabled;
- */
-static inline int pci_ari_enabled(struct pci_bus *bus)
-{
-       return bus->self && bus->self->ari_enabled;
-}
-
 void pci_reassigndev_resource_alignment(struct pci_dev *dev);
 void pci_disable_bridge_window(struct pci_dev *dev);
 
index 353db8dc4c6e0eca74751d4aabc8b0cb28fc4c7a..2925561a8f1ef1f4d41ea4573eb128e66776e066 100644 (file)
@@ -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 */