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
  19453    2260       5   21718    54d6 drivers/usb/gadget/udc/net2272.o

File size After adding 'const':
   text    data     bss     dec     hex filename
  19549    2164       5   21718    54d6 drivers/usb/gadget/udc/net2272.o

Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>
---
 drivers/usb/gadget/udc/net2272.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
index 8f85a51..91ab2ad80 100644
--- a/drivers/usb/gadget/udc/net2272.c
+++ b/drivers/usb/gadget/udc/net2272.c
@@ -2556,7 +2556,7 @@ net2272_pci_remove(struct pci_dev *pdev)
 }
 
 /* Table of matching PCI IDs */
-static struct pci_device_id pci_ids[] = {
+static const struct pci_device_id pci_ids[] = {
        {       /* RDK 1 card */
                .class       = ((PCI_CLASS_BRIDGE_OTHER << 8) | 0xfe),
                .class_mask  = 0,
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to