]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
media: radio: constify usb_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sun, 13 Aug 2017 08:54:45 +0000 (04:54 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:04:59 +0000 (08:04 -0400)
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>
drivers/media/radio/dsbr100.c
drivers/media/radio/radio-keene.c
drivers/media/radio/radio-ma901.c
drivers/media/radio/radio-mr800.c
drivers/media/radio/radio-raremono.c
drivers/media/radio/radio-shark.c
drivers/media/radio/radio-shark2.c
drivers/media/radio/si470x/radio-si470x-usb.c
drivers/media/radio/si4713/radio-usb-si4713.c

index 53bc8c0100357c56ee5e4c678c76414c34be20b9..8521bb2825e8c639251ec2c842f339eb7efae556 100644 (file)
@@ -408,7 +408,7 @@ err_reg_dev:
        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 */
 };
index 53a7c2e87762ae7eeb9c6cbb12489debe2a5f890..f2ea8bc5f5eea11dbd266e881d3e3b8cfe2dd1e0 100644 (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 */
index c2010a905a4727358666b98609f408faf191554a..fdc481257efddbbf3d45a706b4b4a6d65e66e55c 100644 (file)
@@ -444,7 +444,7 @@ err:
 }
 
 /* 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 */
index 95c12532e87a2dcd1ea62412d9ece6b33c5cdf18..c9f59129af7938d9d9d56a465c5b2dc36f833e1a 100644 (file)
@@ -587,7 +587,7 @@ err:
 }
 
 /* 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 */
index bfb3a6d051bad35b6609a4affeb3a0c7e5f8f2fb..3c0a22a54113b4dffe43ac93e6b591d107d4d12f 100644 (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 */
 };
index 23971f5502a8514d883751f094a9e0ccf3a45775..22f3466af2b187d1779c1bd81515ae5e85d3f9ad 100644 (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,
index b50638ec5f09633f268434789faec47e406b4835..4d1a4b3d669cf5fcdcde0d2b3a882d059baa0acd 100644 (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,
index 571f29a34bf81e23f35fedae5a10ec9a6bc50d5d..c311f9951d80663f2a2c6745d383776cc89f1419 100644 (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) */
index e5e5a1672bdbc3128622d99e62943447b8bb8e0f..febc9c1e78ff7e743ca5bac2a627cfb122d32daa 100644 (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 */