diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-11-22 05:32:53 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-12-03 08:26:45 -0500 |
commit | 22dbec265c4fbea4cecc37bcbdbb730c0bc639ff (patch) | |
tree | 5b667ac50935e804b5f764ffbad7ab95686b5223 | |
parent | 85f9e06c59cb93db93b163388d77d7aa9b6eed5a (diff) |
[media] media, sound: tea575x: constify snd_tea575x_ops structures
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>
-rw-r--r-- | drivers/media/pci/bt8xx/bttv-cards.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-maxiradio.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-sf16fmr2.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/radio-shark.c | 2 | ||||
-rw-r--r-- | include/media/drv-intf/tea575x.h | 2 | ||||
-rw-r--r-- | sound/pci/es1968.c | 2 | ||||
-rw-r--r-- | sound/pci/fm801.c | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c index 7a081023d751..8a17cc0bfa07 100644 --- a/drivers/media/pci/bt8xx/bttv-cards.c +++ b/drivers/media/pci/bt8xx/bttv-cards.c | |||
@@ -3808,7 +3808,7 @@ static void bttv_tea575x_set_direction(struct snd_tea575x *tea, bool output) | |||
3808 | gpio_inout(mask, (1 << gpio.clk) | (1 << gpio.wren)); | 3808 | gpio_inout(mask, (1 << gpio.clk) | (1 << gpio.wren)); |
3809 | } | 3809 | } |
3810 | 3810 | ||
3811 | static struct snd_tea575x_ops bttv_tea_ops = { | 3811 | static const struct snd_tea575x_ops bttv_tea_ops = { |
3812 | .set_pins = bttv_tea575x_set_pins, | 3812 | .set_pins = bttv_tea575x_set_pins, |
3813 | .get_pins = bttv_tea575x_get_pins, | 3813 | .get_pins = bttv_tea575x_get_pins, |
3814 | .set_direction = bttv_tea575x_set_direction, | 3814 | .set_direction = bttv_tea575x_set_direction, |
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index 41c16520a367..70fd8e80198a 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c | |||
@@ -108,7 +108,7 @@ static void maxiradio_tea575x_set_direction(struct snd_tea575x *tea, bool output | |||
108 | { | 108 | { |
109 | } | 109 | } |
110 | 110 | ||
111 | static struct snd_tea575x_ops maxiradio_tea_ops = { | 111 | static const struct snd_tea575x_ops maxiradio_tea_ops = { |
112 | .set_pins = maxiradio_tea575x_set_pins, | 112 | .set_pins = maxiradio_tea575x_set_pins, |
113 | .get_pins = maxiradio_tea575x_get_pins, | 113 | .get_pins = maxiradio_tea575x_get_pins, |
114 | .set_direction = maxiradio_tea575x_set_direction, | 114 | .set_direction = maxiradio_tea575x_set_direction, |
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index 8e4f1d18c9b2..dc81d422b394 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c | |||
@@ -82,7 +82,7 @@ static void fmr2_tea575x_set_direction(struct snd_tea575x *tea, bool output) | |||
82 | { | 82 | { |
83 | } | 83 | } |
84 | 84 | ||
85 | static struct snd_tea575x_ops fmr2_tea_ops = { | 85 | static const struct snd_tea575x_ops fmr2_tea_ops = { |
86 | .set_pins = fmr2_tea575x_set_pins, | 86 | .set_pins = fmr2_tea575x_set_pins, |
87 | .get_pins = fmr2_tea575x_get_pins, | 87 | .get_pins = fmr2_tea575x_get_pins, |
88 | .set_direction = fmr2_tea575x_set_direction, | 88 | .set_direction = fmr2_tea575x_set_direction, |
diff --git a/drivers/media/radio/radio-shark.c b/drivers/media/radio/radio-shark.c index 409fac188d40..85667a95f003 100644 --- a/drivers/media/radio/radio-shark.c +++ b/drivers/media/radio/radio-shark.c | |||
@@ -150,7 +150,7 @@ static u32 shark_read_val(struct snd_tea575x *tea) | |||
150 | return val; | 150 | return val; |
151 | } | 151 | } |
152 | 152 | ||
153 | static struct snd_tea575x_ops shark_tea_ops = { | 153 | static const struct snd_tea575x_ops shark_tea_ops = { |
154 | .write_val = shark_write_val, | 154 | .write_val = shark_write_val, |
155 | .read_val = shark_read_val, | 155 | .read_val = shark_read_val, |
156 | }; | 156 | }; |
diff --git a/include/media/drv-intf/tea575x.h b/include/media/drv-intf/tea575x.h index 5d096578b736..fb272d48ba33 100644 --- a/include/media/drv-intf/tea575x.h +++ b/include/media/drv-intf/tea575x.h | |||
@@ -63,7 +63,7 @@ struct snd_tea575x { | |||
63 | u32 band; /* 0: FM, 1: FM-Japan, 2: AM */ | 63 | u32 band; /* 0: FM, 1: FM-Japan, 2: AM */ |
64 | u32 freq; /* frequency */ | 64 | u32 freq; /* frequency */ |
65 | struct mutex mutex; | 65 | struct mutex mutex; |
66 | struct snd_tea575x_ops *ops; | 66 | const struct snd_tea575x_ops *ops; |
67 | void *private_data; | 67 | void *private_data; |
68 | u8 card[32]; | 68 | u8 card[32]; |
69 | u8 bus_info[32]; | 69 | u8 bus_info[32]; |
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index cb38cd1c5fc4..514f2604086e 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -2605,7 +2605,7 @@ static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool outpu | |||
2605 | } | 2605 | } |
2606 | } | 2606 | } |
2607 | 2607 | ||
2608 | static struct snd_tea575x_ops snd_es1968_tea_ops = { | 2608 | static const struct snd_tea575x_ops snd_es1968_tea_ops = { |
2609 | .set_pins = snd_es1968_tea575x_set_pins, | 2609 | .set_pins = snd_es1968_tea575x_set_pins, |
2610 | .get_pins = snd_es1968_tea575x_get_pins, | 2610 | .get_pins = snd_es1968_tea575x_get_pins, |
2611 | .set_direction = snd_es1968_tea575x_set_direction, | 2611 | .set_direction = snd_es1968_tea575x_set_direction, |
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 5144a7fcb5aa..759295aa8366 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -815,7 +815,7 @@ static void snd_fm801_tea575x_set_direction(struct snd_tea575x *tea, bool output | |||
815 | fm801_writew(chip, GPIO_CTRL, reg); | 815 | fm801_writew(chip, GPIO_CTRL, reg); |
816 | } | 816 | } |
817 | 817 | ||
818 | static struct snd_tea575x_ops snd_fm801_tea_ops = { | 818 | static const struct snd_tea575x_ops snd_fm801_tea_ops = { |
819 | .set_pins = snd_fm801_tea575x_set_pins, | 819 | .set_pins = snd_fm801_tea575x_set_pins, |
820 | .get_pins = snd_fm801_tea575x_get_pins, | 820 | .get_pins = snd_fm801_tea575x_get_pins, |
821 | .set_direction = snd_fm801_tea575x_set_direction, | 821 | .set_direction = snd_fm801_tea575x_set_direction, |