From 85ab373843a642a4b4e9228095e6233521e55494 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Thu, 17 Aug 2017 14:45:50 +0530 Subject: ALSA: atmel: make snd_pcm_hardware const Make this const as it is only used in a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai --- sound/atmel/ac97c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/atmel/ac97c.c') diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 9d2c9d9af688..f85131bfa6cd 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c @@ -66,7 +66,7 @@ struct atmel_ac97c { #define ac97c_readl(chip, reg) \ __raw_readl((chip)->regs + AC97C_##reg) -static struct snd_pcm_hardware atmel_ac97c_hw = { +static const struct snd_pcm_hardware atmel_ac97c_hw = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED -- cgit v1.2.3 From 1086373713fbd602ab73c1968e5f91f15f647c49 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 13:15:11 +0530 Subject: ALSA: atmel: constify snd_pcm_ops structures snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by work with const snd_pcm_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai --- sound/atmel/ac97c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/atmel/ac97c.c') diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index f85131bfa6cd..5402f825811d 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c @@ -461,7 +461,7 @@ atmel_ac97c_capture_pointer(struct snd_pcm_substream *substream) return frames; } -static struct snd_pcm_ops atmel_ac97_playback_ops = { +static const struct snd_pcm_ops atmel_ac97_playback_ops = { .open = atmel_ac97c_playback_open, .close = atmel_ac97c_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -472,7 +472,7 @@ static struct snd_pcm_ops atmel_ac97_playback_ops = { .pointer = atmel_ac97c_playback_pointer, }; -static struct snd_pcm_ops atmel_ac97_capture_ops = { +static const struct snd_pcm_ops atmel_ac97_capture_ops = { .open = atmel_ac97c_capture_open, .close = atmel_ac97c_capture_close, .ioctl = snd_pcm_lib_ioctl, -- cgit v1.2.3 From 3ca8590be8e784d7b2c806f2bb7dcc2b492fdea5 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Wed, 23 Aug 2017 17:39:26 +0530 Subject: ALSA: ac97c: constify ac97_pcm structures ac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by work with const ac97_pcm. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Takashi Iwai --- sound/atmel/ac97c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/atmel/ac97c.c') diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 5402f825811d..24623c790773 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c @@ -558,7 +558,7 @@ static irqreturn_t atmel_ac97c_interrupt(int irq, void *dev) return retval; } -static struct ac97_pcm at91_ac97_pcm_defs[] = { +static const struct ac97_pcm at91_ac97_pcm_defs[] = { /* Playback */ { .exclusive = 1, -- cgit v1.2.3