Skip to content

Commit 150d04d

Browse files
larsclausenkwilczynski
authored andcommitted
PCI: endpoint: pci-epf-mhi: Make structs pci_epf_ops and pci_epf_event_ops const
Both the pci_epf_ops and pci_epf_evnt_ops structs for the PCI endpoint MHI driver are never modified. Mark them as const so they can be placed in the read-only section. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230722230848.589428-2-lars@metafoo.de Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
1 parent 8636229 commit 150d04d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/endpoint/functions/pci-epf-mhi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ static void pci_epf_mhi_unbind(struct pci_epf *epf)
644644
pci_epc_clear_bar(epc, epf->func_no, epf->vfunc_no, epf_bar);
645645
}
646646

647-
static struct pci_epc_event_ops pci_epf_mhi_event_ops = {
647+
static const struct pci_epc_event_ops pci_epf_mhi_event_ops = {
648648
.core_init = pci_epf_mhi_core_init,
649649
.link_up = pci_epf_mhi_link_up,
650650
.link_down = pci_epf_mhi_link_down,
@@ -682,7 +682,7 @@ static const struct pci_epf_device_id pci_epf_mhi_ids[] = {
682682
{},
683683
};
684684

685-
static struct pci_epf_ops pci_epf_mhi_ops = {
685+
static const struct pci_epf_ops pci_epf_mhi_ops = {
686686
.unbind = pci_epf_mhi_unbind,
687687
.bind = pci_epf_mhi_bind,
688688
};

0 commit comments

Comments
 (0)