diff options
| author | Rob Herring <[email protected]> | 2020-04-09 23:49:21 +0000 |
|---|---|---|
| committer | Lorenzo Pieralisi <[email protected]> | 2020-05-01 15:28:59 +0000 |
| commit | 0b104773b4f72ccd8af98a2f1efe69b174c344d3 (patch) | |
| tree | 911e69c61000209ee777ebd565a493caf9dce609 /drivers/pci/controller/pci-thunder-pem.c | |
| parent | Linux 5.7-rc1 (diff) | |
| download | kernel-0b104773b4f72ccd8af98a2f1efe69b174c344d3.tar.gz kernel-0b104773b4f72ccd8af98a2f1efe69b174c344d3.zip | |
PCI: Constify struct pci_ecam_ops
struct pci_ecam_ops is typically DT match table data which is defined to
be const. It's also best practice for ops structs to be const. Ideally,
we'd make struct pci_ops const as well, but that becomes pretty
invasive, so for now we just cast it where needed.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Rob Herring <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Cc: Andrew Murray <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Jonathan Chocron <[email protected]>
Cc: Zhou Wang <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: Toan Le <[email protected]>
Cc: Marc Gonzalez <[email protected]>
Cc: Mans Rullgard <[email protected]>
Cc: [email protected]
Diffstat (limited to 'drivers/pci/controller/pci-thunder-pem.c')
| -rw-r--r-- | drivers/pci/controller/pci-thunder-pem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/controller/pci-thunder-pem.c b/drivers/pci/controller/pci-thunder-pem.c index 9491e266b1ea..2e792707ceab 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 = { |
