mirror of https://gitee.com/openkylin/linux.git
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:
parent
7fb2e072d4
commit
1ab2234eef
|
@ -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 */
|
||||
};
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) */
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue