PCI/portdrv: Encapsulate pcie_ports_auto inside the port driver
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 9 Mar 2018 17:21:29 +0000 (11:21 -0600)
committerBjorn Helgaas <helgaas@kernel.org>
Fri, 30 Mar 2018 22:26:58 +0000 (17:26 -0500)
"pcie_ports_auto" is only used inside the PCIe port driver itself, so
move it from include/linux/pci.h to portdrv.h so it's not visible to the
whole kernel.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/portdrv.h
include/linux/pci.h

index 86368f9..62e28b5 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <linux/compiler.h>
 
+extern bool pcie_ports_auto;
+
 /* Service Type */
 #define PCIE_PORT_SERVICE_PME_SHIFT    0       /* Power Management Event */
 #define PCIE_PORT_SERVICE_PME          (1 << PCIE_PORT_SERVICE_PME_SHIFT)
index a04b7ab..dc70a3c 100644 (file)
@@ -1449,10 +1449,8 @@ static inline int pci_irqd_intx_xlate(struct irq_domain *d,
 
 #ifdef CONFIG_PCIEPORTBUS
 extern bool pcie_ports_disabled;
-extern bool pcie_ports_auto;
 #else
 #define pcie_ports_disabled    true
-#define pcie_ports_auto                false
 #endif
 
 #ifdef CONFIG_PCIEASPM