Commit 68bb22e9 authored by Alan Douglas's avatar Alan Douglas Committed by Bjorn Helgaas

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: 6e0832fa ("PCI: Collect all native drivers under drivers/pci/controller/")
Signed-off-by: default avatarAlan Douglas <adouglas@cadence.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 6f6f4246
...@@ -28,10 +28,10 @@ obj-$(CONFIG_PCI_PF_STUB) += pci-pf-stub.o ...@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment