mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/pci/intel_mid_pci: make intel_mid_pci_ops const and __initconst
@ 2017-09-18 16:24 Bhumika Goyal
  2017-09-19 19:45 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-09-18 16:24 UTC (permalink / raw)
  To: julia.lawall, bhelgaas, tglx, mingo, hpa, x86, linux-pci, linux-kernel
  Cc: Bhumika Goyal

Make this const as it is only used during a copy operation. This usage
is inside init function and the structure is not referenced after
initialisation, so make it __initconst too.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 arch/x86/pci/intel_mid_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c
index b901ece..63fbe8f 100644
--- a/arch/x86/pci/intel_mid_pci.c
+++ b/arch/x86/pci/intel_mid_pci.c
@@ -279,7 +279,7 @@ static void intel_mid_pci_irq_disable(struct pci_dev *dev)
 	}
 }
 
-static struct pci_ops intel_mid_pci_ops = {
+static const struct pci_ops intel_mid_pci_ops __initconst = {
 	.read = pci_read,
 	.write = pci_write,
 };
-- 
1.9.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-19 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-18 16:24 [PATCH] x86/pci/intel_mid_pci: make intel_mid_pci_ops const and __initconst Bhumika Goyal
2017-09-19 19:45 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®