]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: esas2r: constify pci_device_id.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sun, 30 Jul 2017 08:40:32 +0000 (14:10 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 02:28:52 +0000 (22:28 -0400)
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with const
pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/esas2r/esas2r_main.c

index f2e9d8aa979ca66c0f9226834b3d7ae8bd62769d..81f226be3e3b72067b87fe6d2553f91e7783b62f 100644 (file)
@@ -309,7 +309,7 @@ MODULE_PARM_DESC(interrupt_mode,
                 "Defines the interrupt mode to use.  0 for legacy"
                 ", 1 for MSI.  Default is MSI (1).");
 
-static struct pci_device_id
+static const struct pci_device_id
        esas2r_pci_table[] = {
        { ATTO_VENDOR_ID, 0x0049,         ATTO_VENDOR_ID, 0x0049,
          0,