Skip to content

Commit 840a720

Browse files
rikardfalkebornLorenzo Pieralisi
authored andcommitted
PCI: qcom-ep: Constify static dw_pcie_ep_ops
The only usage of pci_ep_ops is to assign its address to the ops field in the dw_pcie_ep struct which is a pointer to const struct dw_pcie_ep_ops. Make it const to allow the compiler to put it in read-only memory. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rikard Falkeborn <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Krzysztof Wilczyński <[email protected]>
1 parent 3f13d61 commit 840a720

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/dwc/pcie-qcom-ep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ static void qcom_pcie_ep_init(struct dw_pcie_ep *ep)
619619
dw_pcie_ep_reset_bar(pci, bar);
620620
}
621621

622-
static struct dw_pcie_ep_ops pci_ep_ops = {
622+
static const struct dw_pcie_ep_ops pci_ep_ops = {
623623
.ep_init = qcom_pcie_ep_init,
624624
.raise_irq = qcom_pcie_ep_raise_irq,
625625
.get_features = qcom_pcie_epc_get_features,

0 commit comments

Comments
 (0)