aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-02-07 23:16:04 +0100
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2021-03-22 12:56:47 +0000
commitd895ce703098fe4939b081026d77afccddec44df (patch)
treed5d151fd06931a26620193a6f44c69c50b92489f /drivers/pci
parenta38fd8748464831584a19438cbb3082b5a2dab15 (diff)
downloadlinux-backports-d895ce703098fe4939b081026d77afccddec44df.tar.gz
linux-backports-d895ce703098fe4939b081026d77afccddec44df.tar.bz2
linux-backports-d895ce703098fe4939b081026d77afccddec44df.zip
PCI: tegra: Constify static structs
The only usage of them is to assign their address to the 'ops' field in the pcie_port and the dw_pcie_ep structs, both which are pointers to const. Make them const to allow the compiler to put them in read-only memory. Link: https://lore.kernel.org/r/20210207221604.48910-1-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Krzysztof WilczyƄski <kw@linux.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/dwc/pcie-tegra194.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
index 6fa216e52d14..18acd48e8e9b 100644
--- a/drivers/pci/controller/dwc/pcie-tegra194.c
+++ b/drivers/pci/controller/dwc/pcie-tegra194.c
@@ -1019,7 +1019,7 @@ static const struct dw_pcie_ops tegra_dw_pcie_ops = {
.stop_link = tegra_pcie_dw_stop_link,
};
-static struct dw_pcie_host_ops tegra_pcie_dw_host_ops = {
+static const struct dw_pcie_host_ops tegra_pcie_dw_host_ops = {
.host_init = tegra_pcie_dw_host_init,
};
@@ -1881,7 +1881,7 @@ tegra_pcie_ep_get_features(struct dw_pcie_ep *ep)
return &tegra_pcie_epc_features;
}
-static struct dw_pcie_ep_ops pcie_ep_ops = {
+static const struct dw_pcie_ep_ops pcie_ep_ops = {
.raise_irq = tegra_pcie_ep_raise_irq,
.get_features = tegra_pcie_ep_get_features,
};