Skip to content

Commit 9b4355f

Browse files
ArvindYadavCsdavem330
authored andcommitted
net: usb: r8152: 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 06fa59a commit 9b4355f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/usb/r8152.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5303,7 +5303,7 @@ static void rtl8152_disconnect(struct usb_interface *intf)
53035303
.bInterfaceProtocol = USB_CDC_PROTO_NONE
53045304

53055305
/* table of devices that work with this driver */
5306-
static struct usb_device_id rtl8152_table[] = {
5306+
static const struct usb_device_id rtl8152_table[] = {
53075307
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8050)},
53085308
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)},
53095309
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)},

0 commit comments

Comments
 (0)