]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
x86/pci/intel_mid_pci: Constify intel_mid_pci_ops and make it __initconst
authorBhumika Goyal <bhumirks@gmail.com>
Mon, 18 Sep 2017 16:24:55 +0000 (21:54 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 5 Oct 2017 20:53:31 +0000 (15:53 -0500)
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>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
arch/x86/pci/intel_mid_pci.c

index b901ece278dddb4f6aaf61c8b6479a26526af71a..63fbe8f5c70ef56260aa55fa2f2268bd3f9d6f41 100644 (file)
@@ -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,
 };