PCI: Initialize endpoint library before controllers

The endpoint library must be initialized before its users, which are in
drivers/pci/controllers.  The endpoint initialization currently depends on
link order.

This corrects a kernel crash when loading the Cadence EP driver, since it
calls devm_pci_epc_create() and this is only valid once the endpoint
library has been initialized.

Fixes: 6e0832fa43 ("PCI: Collect all native drivers under drivers/pci/controller/")
Signed-off-by: Alan Douglas <adouglas@cadence.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
Alan Douglas 2018-06-22 17:17:17 +01:00 committed by Bjorn Helgaas
parent 6f6f42466d
commit 68bb22e9d5
1 changed files with 3 additions and 3 deletions

View File

@ -28,10 +28,10 @@ obj-$(CONFIG_PCI_PF_STUB) += pci-pf-stub.o
obj-$(CONFIG_PCI_ECAM) += ecam.o obj-$(CONFIG_PCI_ECAM) += ecam.o
obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o
obj-y += controller/
obj-y += switch/
# Endpoint library must be initialized before its users # Endpoint library must be initialized before its users
obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ obj-$(CONFIG_PCI_ENDPOINT) += endpoint/
obj-y += controller/
obj-y += switch/
ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG