From: Lars-Peter Clausen Date: Sat, 22 Jul 2023 23:08:48 +0000 (-0700) Subject: PCI: endpoint: pci-epf-test: Make struct pci_epf_ops const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6f517e044096fd78fa6f19b3da20579426980af7;p=linux.git PCI: endpoint: pci-epf-test: Make struct pci_epf_ops const The pci_epf_ops struct for the PCI endpoint test driver is never modified. Mark it as const so it can be placed in the read-only section. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230722230848.589428-5-lars@metafoo.de Signed-off-by: Lars-Peter Clausen Signed-off-by: Krzysztof WilczyƄski Reviewed-by: Manivannan Sadhasivam --- diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 1f0d2b84296a3..7cc1c5c70afc0 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -973,7 +973,7 @@ static int pci_epf_test_probe(struct pci_epf *epf, return 0; } -static struct pci_epf_ops ops = { +static const struct pci_epf_ops ops = { .unbind = pci_epf_test_unbind, .bind = pci_epf_test_bind, };