Commit 1ab2234e authored by Arvind Yadav's avatar Arvind Yadav Committed by Mauro Carvalho Chehab

media: radio: 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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 7fb2e072
...@@ -408,7 +408,7 @@ static int usb_dsbr100_probe(struct usb_interface *intf, ...@@ -408,7 +408,7 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
return retval; return retval;
} }
static struct usb_device_id usb_dsbr100_device_table[] = { static const struct usb_device_id usb_dsbr100_device_table[] = {
{ USB_DEVICE(DSB100_VENDOR, DSB100_PRODUCT) }, { USB_DEVICE(DSB100_VENDOR, DSB100_PRODUCT) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
......
...@@ -45,7 +45,7 @@ MODULE_LICENSE("GPL"); ...@@ -45,7 +45,7 @@ MODULE_LICENSE("GPL");
#define FREQ_MUL 16000U #define FREQ_MUL 16000U
/* USB Device ID List */ /* USB Device ID List */
static struct usb_device_id usb_keene_device_table[] = { static const struct usb_device_id usb_keene_device_table[] = {
{USB_DEVICE_AND_INTERFACE_INFO(USB_KEENE_VENDOR, USB_KEENE_PRODUCT, {USB_DEVICE_AND_INTERFACE_INFO(USB_KEENE_VENDOR, USB_KEENE_PRODUCT,
USB_CLASS_HID, 0, 0) }, USB_CLASS_HID, 0, 0) },
{ } /* Terminating entry */ { } /* Terminating entry */
......
...@@ -444,7 +444,7 @@ static int usb_ma901radio_probe(struct usb_interface *intf, ...@@ -444,7 +444,7 @@ static int usb_ma901radio_probe(struct usb_interface *intf,
} }
/* USB Device ID List */ /* USB Device ID List */
static struct usb_device_id usb_ma901radio_device_table[] = { static const struct usb_device_id usb_ma901radio_device_table[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(USB_MA901_VENDOR, USB_MA901_PRODUCT, { USB_DEVICE_AND_INTERFACE_INFO(USB_MA901_VENDOR, USB_MA901_PRODUCT,
USB_CLASS_HID, 0, 0) }, USB_CLASS_HID, 0, 0) },
{ } /* Terminating entry */ { } /* Terminating entry */
......
...@@ -587,7 +587,7 @@ static int usb_amradio_probe(struct usb_interface *intf, ...@@ -587,7 +587,7 @@ static int usb_amradio_probe(struct usb_interface *intf,
} }
/* USB Device ID List */ /* USB Device ID List */
static struct usb_device_id usb_amradio_device_table[] = { static const struct usb_device_id usb_amradio_device_table[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(USB_AMRADIO_VENDOR, USB_AMRADIO_PRODUCT, { USB_DEVICE_AND_INTERFACE_INFO(USB_AMRADIO_VENDOR, USB_AMRADIO_PRODUCT,
USB_CLASS_HID, 0, 0) }, USB_CLASS_HID, 0, 0) },
{ } /* Terminating entry */ { } /* Terminating entry */
......
...@@ -58,7 +58,7 @@ MODULE_LICENSE("GPL v2"); ...@@ -58,7 +58,7 @@ MODULE_LICENSE("GPL v2");
*/ */
/* USB Device ID List */ /* USB Device ID List */
static struct usb_device_id usb_raremono_device_table[] = { static const struct usb_device_id usb_raremono_device_table[] = {
{USB_DEVICE_AND_INTERFACE_INFO(0x10c4, 0x818a, USB_CLASS_HID, 0, 0) }, {USB_DEVICE_AND_INTERFACE_INFO(0x10c4, 0x818a, USB_CLASS_HID, 0, 0) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
......
...@@ -392,7 +392,7 @@ static int usb_shark_resume(struct usb_interface *intf) ...@@ -392,7 +392,7 @@ static int usb_shark_resume(struct usb_interface *intf)
#endif #endif
/* Specify the bcdDevice value, as the radioSHARK and radioSHARK2 share ids */ /* Specify the bcdDevice value, as the radioSHARK and radioSHARK2 share ids */
static struct usb_device_id usb_shark_device_table[] = { static const struct usb_device_id usb_shark_device_table[] = {
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION |
USB_DEVICE_ID_MATCH_INT_CLASS, USB_DEVICE_ID_MATCH_INT_CLASS,
.idVendor = 0x077d, .idVendor = 0x077d,
......
...@@ -358,7 +358,7 @@ static int usb_shark_resume(struct usb_interface *intf) ...@@ -358,7 +358,7 @@ static int usb_shark_resume(struct usb_interface *intf)
#endif #endif
/* Specify the bcdDevice value, as the radioSHARK and radioSHARK2 share ids */ /* Specify the bcdDevice value, as the radioSHARK and radioSHARK2 share ids */
static struct usb_device_id usb_shark_device_table[] = { static const struct usb_device_id usb_shark_device_table[] = {
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION |
USB_DEVICE_ID_MATCH_INT_CLASS, USB_DEVICE_ID_MATCH_INT_CLASS,
.idVendor = 0x077d, .idVendor = 0x077d,
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
/* USB Device ID List */ /* USB Device ID List */
static struct usb_device_id si470x_usb_driver_id_table[] = { static const struct usb_device_id si470x_usb_driver_id_table[] = {
/* Silicon Labs USB FM Radio Reference Design */ /* Silicon Labs USB FM Radio Reference Design */
{ USB_DEVICE_AND_INTERFACE_INFO(0x10c4, 0x818a, USB_CLASS_HID, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(0x10c4, 0x818a, USB_CLASS_HID, 0, 0) },
/* ADS/Tech FM Radio Receiver (formerly Instant FM Music) */ /* ADS/Tech FM Radio Receiver (formerly Instant FM Music) */
......
...@@ -49,7 +49,7 @@ MODULE_LICENSE("GPL v2"); ...@@ -49,7 +49,7 @@ MODULE_LICENSE("GPL v2");
#define USB_RESP_TIMEOUT 50000 #define USB_RESP_TIMEOUT 50000
/* USB Device ID List */ /* USB Device ID List */
static struct usb_device_id usb_si4713_usb_device_table[] = { static const struct usb_device_id usb_si4713_usb_device_table[] = {
{USB_DEVICE_AND_INTERFACE_INFO(USB_SI4713_VENDOR, USB_SI4713_PRODUCT, {USB_DEVICE_AND_INTERFACE_INFO(USB_SI4713_VENDOR, USB_SI4713_PRODUCT,
USB_CLASS_HID, 0, 0) }, USB_CLASS_HID, 0, 0) },
{ } /* Terminating entry */ { } /* Terminating entry */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment