misc: ioc4: constify pci_device_id.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sun, 30 Jul 2017 05:26:37 +0000 (10:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 14:55:48 +0000 (16:55 +0200)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ioc4.c

index 8758d033db23d7b84c7be8b2170f6702b1c979a3..ec08322781708171951bd5e76a4406b26ca4fdfa 100644 (file)
@@ -454,7 +454,7 @@ ioc4_remove(struct pci_dev *pdev)
        kfree(idd);
 }
 
-static struct pci_device_id ioc4_id_table[] = {
+static const struct pci_device_id ioc4_id_table[] = {
        {PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC4, PCI_ANY_ID,
         PCI_ANY_ID, 0x0b4000, 0xFFFFFF},
        {0}