提交 22dbec26 编写于 作者: J Julia Lawall 提交者: Mauro Carvalho Chehab

[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: NJulia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 85f9e06c
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
};
......
......@@ -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];
......
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册