media: radio: constify pnp_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 16 Aug 2017 05:30:10 +0000 (01:30 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:25:11 +0000 (08:25 -0400)
pnp_device_id are not supposed to change at runtime. All functions
working with pnp_device_id provided by <linux/pnp.h> work with
const pnp_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/radio-cadet.c
drivers/media/radio/radio-gemtek.c
drivers/media/radio/radio-sf16fmr2.c

index cbaf850f47912792c75e8b9fed8de4b9258816ba..6888b7db449d2e4d56ab5f1a84898301b6c815e3 100644 (file)
@@ -528,7 +528,7 @@ static const struct v4l2_ctrl_ops cadet_ctrl_ops = {
 
 #ifdef CONFIG_PNP
 
-static struct pnp_device_id cadet_pnp_devices[] = {
+static const struct pnp_device_id cadet_pnp_devices[] = {
        /* ADS Cadet AM/FM Radio Card */
        {.id = "MSM0c24", .driver_data = 0},
        {.id = ""}
index ca051ccbc3e45ee1255a9bd89f11c6049af40269..ddc12b16f77ca8d0d26234fa7ebfb6f2220df48a 100644 (file)
@@ -281,7 +281,7 @@ static const struct radio_isa_ops gemtek_ops = {
 static const int gemtek_ioports[] = { 0x20c, 0x30c, 0x24c, 0x34c, 0x248, 0x28c };
 
 #ifdef CONFIG_PNP
-static struct pnp_device_id gemtek_pnp_devices[] = {
+static const struct pnp_device_id gemtek_pnp_devices[] = {
        /* AOpen FX-3D/Pro Radio */
        {.id = "ADS7183", .driver_data = 0},
        {.id = ""}
index dc81d422b3947944cddee6d0a76a47f792e8f91b..de79d5569c2a84f40301d0234a417ec44fbb0abf 100644 (file)
@@ -197,7 +197,7 @@ static int fmr2_tea_ext_init(struct snd_tea575x *tea)
        return 0;
 }
 
-static struct pnp_device_id fmr2_pnp_ids[] = {
+static const struct pnp_device_id fmr2_pnp_ids[] = {
        { .id = "MFRad13" }, /* tuner subdevice of SF16-FMD2 */
        { .id = "" }
 };