Messages in this thread Patch in this message | | | From | Arvind Yadav <> | Subject | [PATCH] firewire: nosy: constify pci_device_id. | Date | Sat, 15 Jul 2017 10:08:46 +0530 |
| |
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 5796 389 0 6185 1829 drivers/firewire/nosy.o
File size After adding 'const': text data bss dec hex filename 5860 325 0 6185 1829 drivers/firewire/nosy.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- drivers/firewire/nosy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firewire/nosy.c b/drivers/firewire/nosy.c index 180f0a9..d16a9dc9 100644 --- a/drivers/firewire/nosy.c +++ b/drivers/firewire/nosy.c @@ -694,7 +694,7 @@ add_card(struct pci_dev *dev, const struct pci_device_id *unused) return ret; } -static struct pci_device_id pci_table[] = { +static const struct pci_device_id pci_table[] = { { .vendor = PCI_VENDOR_ID_TI, .device = PCI_DEVICE_ID_TI_PCILYNX, -- 2.7.4
| |