applicom: constify pci_device_id.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 1 Aug 2017 16:01:57 +0000 (21:31 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 15:11:28 +0000 (17:11 +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/char/applicom.c

index b67263d6e34b172a87381a4cfe21fed42bf0799c..c0a5b1f3a9863b17bf232d7d432a16943a90d252 100644 (file)
@@ -67,7 +67,7 @@ static char *applicom_pci_devnames[] = {
        "PCI2000PFB"
 };
 
-static struct pci_device_id applicom_pci_tbl[] = {
+static const struct pci_device_id applicom_pci_tbl[] = {
        { PCI_VDEVICE(APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC) },
        { PCI_VDEVICE(APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN) },
        { PCI_VDEVICE(APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000PFB) },