[media] media, sound: tea575x: constify snd_tea575x_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 22 Nov 2015 10:32:53 +0000 (08:32 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 3 Dec 2015 13:26:45 +0000 (11:26 -0200)
The snd_tea575x_ops structures are never modified, so declare them as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/bt8xx/bttv-cards.c
drivers/media/radio/radio-maxiradio.c
drivers/media/radio/radio-sf16fmr2.c
drivers/media/radio/radio-shark.c
include/media/drv-intf/tea575x.h
sound/pci/es1968.c
sound/pci/fm801.c

index 7a081023d7512b818d8e6cebd0f9e8e95eaf4bc6..8a17cc0bfa0737ec80818aaa9a3bcbae05feedca 100644 (file)
@@ -3808,7 +3808,7 @@ static void bttv_tea575x_set_direction(struct snd_tea575x *tea, bool output)
                gpio_inout(mask, (1 << gpio.clk) | (1 << gpio.wren));
 }
 
-static struct snd_tea575x_ops bttv_tea_ops = {
+static const struct snd_tea575x_ops bttv_tea_ops = {
        .set_pins = bttv_tea575x_set_pins,
        .get_pins = bttv_tea575x_get_pins,
        .set_direction = bttv_tea575x_set_direction,
index 41c16520a367adc915a2cbf2b665281bb782fb84..70fd8e80198a5797895a5a7a60056307279bd795 100644 (file)
@@ -108,7 +108,7 @@ static void maxiradio_tea575x_set_direction(struct snd_tea575x *tea, bool output
 {
 }
 
-static struct snd_tea575x_ops maxiradio_tea_ops = {
+static const struct snd_tea575x_ops maxiradio_tea_ops = {
        .set_pins = maxiradio_tea575x_set_pins,
        .get_pins = maxiradio_tea575x_get_pins,
        .set_direction = maxiradio_tea575x_set_direction,
index 8e4f1d18c9b260234318eee5703a1f366d49709b..dc81d422b3947944cddee6d0a76a47f792e8f91b 100644 (file)
@@ -82,7 +82,7 @@ static void fmr2_tea575x_set_direction(struct snd_tea575x *tea, bool output)
 {
 }
 
-static struct snd_tea575x_ops fmr2_tea_ops = {
+static const struct snd_tea575x_ops fmr2_tea_ops = {
        .set_pins = fmr2_tea575x_set_pins,
        .get_pins = fmr2_tea575x_get_pins,
        .set_direction = fmr2_tea575x_set_direction,
index 409fac188d40c032fa6d8c9510ddad0c5bf66f3d..85667a95f003a053ecfeb9a2ad3254453b543d31 100644 (file)
@@ -150,7 +150,7 @@ static u32 shark_read_val(struct snd_tea575x *tea)
        return val;
 }
 
-static struct snd_tea575x_ops shark_tea_ops = {
+static const struct snd_tea575x_ops shark_tea_ops = {
        .write_val = shark_write_val,
        .read_val  = shark_read_val,
 };
index 5d096578b73688f7bf9fd95899d8f6f9db7c49a1..fb272d48ba33e34104ca6ed91b4388b48ee2e74c 100644 (file)
@@ -63,7 +63,7 @@ struct snd_tea575x {
        u32 band;                       /* 0: FM, 1: FM-Japan, 2: AM */
        u32 freq;                       /* frequency */
        struct mutex mutex;
-       struct snd_tea575x_ops *ops;
+       const struct snd_tea575x_ops *ops;
        void *private_data;
        u8 card[32];
        u8 bus_info[32];
index cb38cd1c5fc4adfb0feb63455761c4ff4dd0dd21..514f2604086e837dd3e986bf6433f8829b224977 100644 (file)
@@ -2605,7 +2605,7 @@ static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool outpu
        }
 }
 
-static struct snd_tea575x_ops snd_es1968_tea_ops = {
+static const struct snd_tea575x_ops snd_es1968_tea_ops = {
        .set_pins = snd_es1968_tea575x_set_pins,
        .get_pins = snd_es1968_tea575x_get_pins,
        .set_direction = snd_es1968_tea575x_set_direction,
index 5144a7fcb5aa5a5ad082149c07dbb061900d8157..759295aa836684f4cff19abe571992d22e1c4f60 100644 (file)
@@ -815,7 +815,7 @@ static void snd_fm801_tea575x_set_direction(struct snd_tea575x *tea, bool output
        fm801_writew(chip, GPIO_CTRL, reg);
 }
 
-static struct snd_tea575x_ops snd_fm801_tea_ops = {
+static const struct snd_tea575x_ops snd_fm801_tea_ops = {
        .set_pins = snd_fm801_tea575x_set_pins,
        .get_pins = snd_fm801_tea575x_get_pins,
        .set_direction = snd_fm801_tea575x_set_direction,
This page took 0.033263 seconds and 5 git commands to generate.