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: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Arvind Yadav 2017-08-13 04:54:45 -04:00 committed by Mauro Carvalho Chehab
parent 7fb2e072d4
commit 1ab2234eef
9 changed files with 9 additions and 9 deletions

View File

@ -408,7 +408,7 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
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) },
{ } /* Terminating entry */
};

View File

@ -45,7 +45,7 @@ MODULE_LICENSE("GPL");
#define FREQ_MUL 16000U
/* 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_CLASS_HID, 0, 0) },
{ } /* Terminating entry */

View File

@ -444,7 +444,7 @@ static int usb_ma901radio_probe(struct usb_interface *intf,
}
/* 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_CLASS_HID, 0, 0) },
{ } /* Terminating entry */

View File

@ -587,7 +587,7 @@ static int usb_amradio_probe(struct usb_interface *intf,
}
/* 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_CLASS_HID, 0, 0) },
{ } /* Terminating entry */

View File

@ -58,7 +58,7 @@ MODULE_LICENSE("GPL v2");
*/
/* 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) },
{ } /* Terminating entry */
};

View File

@ -392,7 +392,7 @@ static int usb_shark_resume(struct usb_interface *intf)
#endif
/* 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 |
USB_DEVICE_ID_MATCH_INT_CLASS,
.idVendor = 0x077d,

View File

@ -358,7 +358,7 @@ static int usb_shark_resume(struct usb_interface *intf)
#endif
/* 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 |
USB_DEVICE_ID_MATCH_INT_CLASS,
.idVendor = 0x077d,

View File

@ -38,7 +38,7 @@
/* 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 */
{ USB_DEVICE_AND_INTERFACE_INFO(0x10c4, 0x818a, USB_CLASS_HID, 0, 0) },
/* ADS/Tech FM Radio Receiver (formerly Instant FM Music) */

View File

@ -49,7 +49,7 @@ MODULE_LICENSE("GPL v2");
#define USB_RESP_TIMEOUT 50000
/* 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_CLASS_HID, 0, 0) },
{ } /* Terminating entry */