net: usb: ipheth: constify usb_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 8 Aug 2017 15:58:03 +0000 (21:28 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Aug 2017 00:47:58 +0000 (17:47 -0700)
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>
drivers/net/usb/ipheth.c

index 0f213ea22c75b149822821ba7ea094b286faea7e..d49c7103085e6ef2e1b7672ef8abbc024c4d8ad0 100644 (file)
@@ -87,7 +87,7 @@
 #define IPHETH_CARRIER_CHECK_TIMEOUT round_jiffies_relative(1 * HZ)
 #define IPHETH_CARRIER_ON       0x04
 
-static struct usb_device_id ipheth_table[] = {
+static const struct usb_device_id ipheth_table[] = {
        { USB_DEVICE_AND_INTERFACE_INFO(
                USB_VENDOR_APPLE, USB_PRODUCT_IPHONE,
                IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,