net: irda: kingsun: constify usb_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 8 Aug 2017 15:56:41 +0000 (21:26 +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/irda/kingsun-sir.c

index 24c0f16..4fd4ac2 100644 (file)
@@ -85,7 +85,7 @@
 #define KING_PRODUCT_ID 0x4200
 
 /* These are the currently known USB ids */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
     /* KingSun Co,Ltd  IrDA/USB Bridge */
     { USB_DEVICE(KING_VENDOR_ID, KING_PRODUCT_ID) },
     { }