diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2018-03-09 11:06:56 -0600 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-03-30 17:26:53 -0500 |
commit | c6c889d932bb49d95273711a790d16f814cb213b (patch) | |
tree | 306294c899cde6378617876ea0c10f704558e37a /drivers/pci/pcie/Makefile | |
parent | 79a011194b23302dc43f265ed4237054877768ff (diff) | |
download | linux-next-c6c889d932bb49d95273711a790d16f814cb213b.tar.gz |
PCI/portdrv: Remove pcie_port_bus_type link order dependency
The pcie_port_bus_type must be registered before drivers that depend on it
can be registered. Those drivers include:
pcied_init() # PCIe native hotplug driver
aer_service_init() # AER driver
dpc_service_init() # DPC driver
pcie_pme_service_init() # PME driver
Previously we registered pcie_port_bus_type from pcie_portdrv_init(), a
device_initcall. The callers of pcie_port_service_register() (above) are
also device_initcalls. This is fragile because the device_initcall
ordering depends on link order, which is not explicit.
Register pcie_port_bus_type from pci_driver_init() along with pci_bus_type.
This removes the link order dependency between portdrv and the pciehp, AER,
DPC, and PCIe PME drivers.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/pci/pcie/Makefile')
-rw-r--r-- | drivers/pci/pcie/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pcie/Makefile b/drivers/pci/pcie/Makefile index 223e4c34c29a..e01c10c97b95 100644 --- a/drivers/pci/pcie/Makefile +++ b/drivers/pci/pcie/Makefile @@ -6,7 +6,7 @@ # Build PCI Express ASPM if needed obj-$(CONFIG_PCIEASPM) += aspm.o -pcieportdrv-y := portdrv_core.o portdrv_pci.o portdrv_bus.o +pcieportdrv-y := portdrv_core.o portdrv_pci.o pcieportdrv-$(CONFIG_ACPI) += portdrv_acpi.o obj-$(CONFIG_PCIEPORTBUS) += pcieportdrv.o |