atm: iphase: constify pci_device_id.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sun, 16 Jul 2017 09:32:29 +0000 (15:02 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Jul 2017 23:38:02 +0000 (16:38 -0700)
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.

File size before:
   text    data     bss     dec     hex filename
  23536     432     160   24128    5e40 drivers/atm/iphase.o

File size After adding 'const':
   text    data     bss     dec     hex filename
  23632     336     160   24128    5e40 drivers/atm/iphase.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/iphase.c

index a4fa6c82261e87886250a988cd0a27590e2594cc..fc72b763fdd78684f156956a5960e5abccab0090 100644 (file)
@@ -3266,7 +3266,7 @@ static void ia_remove_one(struct pci_dev *pdev)
        kfree(iadev);
 }
 
-static struct pci_device_id ia_pci_tbl[] = {
+static const struct pci_device_id ia_pci_tbl[] = {
        { PCI_VENDOR_ID_IPHASE, 0x0008, PCI_ANY_ID, PCI_ANY_ID, },
        { PCI_VENDOR_ID_IPHASE, 0x0009, PCI_ANY_ID, PCI_ANY_ID, },
        { 0,}