Skip to content

Commit e1cb90f

Browse files
ArvindYadavCsdavem330
authored andcommitted
net: usb: rtl8150: constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9b4355f commit e1cb90f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/usb/rtl8150.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
#undef EEPROM_WRITE
113113

114114
/* table of devices that work with this driver */
115-
static struct usb_device_id rtl8150_table[] = {
115+
static const struct usb_device_id rtl8150_table[] = {
116116
{USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8150)},
117117
{USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)},
118118
{USB_DEVICE(VENDOR_ID_MICRONET, PRODUCT_ID_SP128AR)},

0 commit comments

Comments
 (0)