소스 검색

x86/pci/intel_mid_pci: Constify intel_mid_pci_ops and make it __initconst

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>
Bhumika Goyal 8 년 전
부모
커밋
4113b0e60b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      arch/x86/pci/intel_mid_pci.c

+ 1 - 1
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,
 };