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 24c0f169a7b19915f08392adcc16a26e37ff257e..4fd4ac2fe09f0c55e10ab756b82471e19e7b6d7c 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) },
     { }