Skip to content

Commit

Permalink
atm: zatm: constify pci_device_id.
Browse files Browse the repository at this point in the history
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
  14350	    352	     40	  14742	   3996	drivers/atm/zatm.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  14446	    256	     40	  14742	   3996	drivers/atm/zatm.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arvind Yadav authored and David S. Miller committed Jul 16, 2017
1 parent 626e87c commit aea39c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/atm/zatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,7 @@ static int zatm_init_one(struct pci_dev *pci_dev,

MODULE_LICENSE("GPL");

static struct pci_device_id zatm_pci_tbl[] = {
static const struct pci_device_id zatm_pci_tbl[] = {
{ PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1221), ZATM_COPPER },
{ PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1225), 0 },
{ 0, }
Expand Down

0 comments on commit aea39c7

Please sign in to comment.