diff options
author | Alan Douglas <adouglas@cadence.com> | 2018-06-22 12:17:17 -0400 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-06-26 16:37:37 -0400 |
commit | 68bb22e9d561ad7c20274eee92058048ac689b98 (patch) | |
tree | 8544a73fd1e434872ff4fffd3fe8e3bbc0172916 | |
parent | 6f6f42466d902c92f21b46a45e6af22d1d663607 (diff) |
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: 6e0832fa432e ("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>
-rw-r--r-- | drivers/pci/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 535201984b8b..1b2cfe51e8d7 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile | |||
@@ -28,10 +28,10 @@ obj-$(CONFIG_PCI_PF_STUB) += pci-pf-stub.o | |||
28 | obj-$(CONFIG_PCI_ECAM) += ecam.o | 28 | obj-$(CONFIG_PCI_ECAM) += ecam.o |
29 | obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o | 29 | obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o |
30 | 30 | ||
31 | obj-y += controller/ | ||
32 | obj-y += switch/ | ||
33 | |||
34 | # Endpoint library must be initialized before its users | 31 | # Endpoint library must be initialized before its users |
35 | obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ | 32 | obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ |
36 | 33 | ||
34 | obj-y += controller/ | ||
35 | obj-y += switch/ | ||
36 | |||
37 | ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG | 37 | ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG |