staging: most: usb: constify usb_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 8 Aug 2017 17:23:13 +0000 (22:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Aug 2017 22:57:16 +0000 (15:57 -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>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-usb/hdm_usb.c

index d0f68cb3c1734729cc041a94e6ce8a0da53bd1cf..a9c3785d19aeec4b60301d03e8661a37423d58a0 100644 (file)
@@ -832,7 +832,7 @@ static const struct file_operations hdm_usb_fops = {
 /**
  * usb_device_id - ID table for HCD device probing
  */
-static struct usb_device_id usbid[] = {
+static const struct usb_device_id usbid[] = {
        { USB_DEVICE(USB_VENDOR_ID_SMSC, USB_DEV_ID_BRDG), },
        { USB_DEVICE(USB_VENDOR_ID_SMSC, USB_DEV_ID_OS81118), },
        { USB_DEVICE(USB_VENDOR_ID_SMSC, USB_DEV_ID_OS81119), },