diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2020-06-04 12:59:16 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-06-04 12:59:16 -0500 |
commit | d388e541e2e3e26adfd9b1c99144176a73e19f95 (patch) | |
tree | 05b6e3b71ec742b52896c3ce6d87469b8aad7a15 /drivers/pci/controller/pci-thunder-pem.c | |
parent | d611b2b85331f3c69863d78835e95d1a5d01f2ef (diff) | |
parent | b2f75a41eaa6bfc4aa6f6a1faefbf21c2c8d1588 (diff) | |
download | kernel_replicant_linux-d388e541e2e3e26adfd9b1c99144176a73e19f95.tar.gz kernel_replicant_linux-d388e541e2e3e26adfd9b1c99144176a73e19f95.tar.bz2 kernel_replicant_linux-d388e541e2e3e26adfd9b1c99144176a73e19f95.zip |
Merge branch 'remotes/lorenzo/pci/host-generic'
- Constify struct pci_ecam_ops (Rob Herring)
- Support building as modules (Rob Herring)
- Eliminate wrappers for pci_host_common_probe() by using DT match table
data (Rob Herring)
* remotes/lorenzo/pci/host-generic:
PCI: host-generic: Eliminate pci_host_common_probe wrappers
PCI: host-generic: Support building as modules
PCI: Constify struct pci_ecam_ops
# Conflicts:
# drivers/pci/controller/dwc/pcie-hisi.c
Diffstat (limited to 'drivers/pci/controller/pci-thunder-pem.c')
-rw-r--r-- | drivers/pci/controller/pci-thunder-pem.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/pci/controller/pci-thunder-pem.c b/drivers/pci/controller/pci-thunder-pem.c index 9491e266b1ea..3f847969143e 100644 --- a/drivers/pci/controller/pci-thunder-pem.c +++ b/drivers/pci/controller/pci-thunder-pem.c @@ -403,7 +403,7 @@ static int thunder_pem_acpi_init(struct pci_config_window *cfg) return thunder_pem_init(dev, cfg, res_pem); } -struct pci_ecam_ops thunder_pem_ecam_ops = { +const struct pci_ecam_ops thunder_pem_ecam_ops = { .bus_shift = 24, .init = thunder_pem_acpi_init, .pci_ops = { @@ -440,7 +440,7 @@ static int thunder_pem_platform_init(struct pci_config_window *cfg) return thunder_pem_init(dev, cfg, res_pem); } -static struct pci_ecam_ops pci_thunder_pem_ops = { +static const struct pci_ecam_ops pci_thunder_pem_ops = { .bus_shift = 24, .init = thunder_pem_platform_init, .pci_ops = { @@ -451,22 +451,20 @@ static struct pci_ecam_ops pci_thunder_pem_ops = { }; static const struct of_device_id thunder_pem_of_match[] = { - { .compatible = "cavium,pci-host-thunder-pem" }, + { + .compatible = "cavium,pci-host-thunder-pem", + .data = &pci_thunder_pem_ops, + }, { }, }; -static int thunder_pem_probe(struct platform_device *pdev) -{ - return pci_host_common_probe(pdev, &pci_thunder_pem_ops); -} - static struct platform_driver thunder_pem_driver = { .driver = { .name = KBUILD_MODNAME, .of_match_table = thunder_pem_of_match, .suppress_bind_attrs = true, }, - .probe = thunder_pem_probe, + .probe = pci_host_common_probe, }; builtin_platform_driver(thunder_pem_driver); |