提交 d895ce70 编写于 作者: R Rikard Falkeborn 提交者: Lorenzo Pieralisi

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.comSigned-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: NKrzysztof Wilczyński <kw@linux.com>
上级 a38fd874
...@@ -1019,7 +1019,7 @@ static const struct dw_pcie_ops tegra_dw_pcie_ops = { ...@@ -1019,7 +1019,7 @@ static const struct dw_pcie_ops tegra_dw_pcie_ops = {
.stop_link = tegra_pcie_dw_stop_link, .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, .host_init = tegra_pcie_dw_host_init,
}; };
...@@ -1881,7 +1881,7 @@ tegra_pcie_ep_get_features(struct dw_pcie_ep *ep) ...@@ -1881,7 +1881,7 @@ tegra_pcie_ep_get_features(struct dw_pcie_ep *ep)
return &tegra_pcie_epc_features; 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, .raise_irq = tegra_pcie_ep_raise_irq,
.get_features = tegra_pcie_ep_get_features, .get_features = tegra_pcie_ep_get_features,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册