[<prev] [next>] [day] [month] [year] [list]
Message-Id: <71d310de470df7c8e991a4627d9d3d9889f818b3.1500187376.git.arvind.yadav.cs@gmail.com>
Date: Sun, 16 Jul 2017 12:17:45 +0530
From: Arvind Yadav <arvind.yadav.cs@...il.com>
To: gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, felipe.balbi@...ux.intel.com
Subject: [PATCH] usb: gadget: udc: net2272: constify pci_device_id.
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.cs@...il.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
Powered by blists - more mailing lists