From 3068116f532639cc0420b30ac574af470c051e85 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Thu, 17 Aug 2017 14:45:53 +0530 Subject: ALSA: mips: make snd_pcm_hardware const Make these const as they are only used in a copy operation. Done using Coccinelle Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai --- sound/mips/hal2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/mips/hal2.c') diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c index 3318c15e324a..367d6c37b47e 100644 --- a/sound/mips/hal2.c +++ b/sound/mips/hal2.c @@ -496,7 +496,7 @@ static void hal2_free_dmabuf(struct hal2_codec *codec) DMA_ATTR_NON_CONSISTENT); } -static struct snd_pcm_hardware hal2_pcm_hw = { +static const struct snd_pcm_hardware hal2_pcm_hw = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | -- cgit v1.2.3 From 915a38d324d23f4fa53306a3a834f54a9f6da17c Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 13:15:14 +0530 Subject: ALSA: mips: 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/mips/hal2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/mips/hal2.c') diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c index 367d6c37b47e..37d378a26a50 100644 --- a/sound/mips/hal2.c +++ b/sound/mips/hal2.c @@ -711,7 +711,7 @@ static int hal2_capture_ack(struct snd_pcm_substream *substream) hal2_capture_transfer); } -static struct snd_pcm_ops hal2_playback_ops = { +static const struct snd_pcm_ops hal2_playback_ops = { .open = hal2_playback_open, .close = hal2_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -723,7 +723,7 @@ static struct snd_pcm_ops hal2_playback_ops = { .ack = hal2_playback_ack, }; -static struct snd_pcm_ops hal2_capture_ops = { +static const struct snd_pcm_ops hal2_capture_ops = { .open = hal2_capture_open, .close = hal2_capture_close, .ioctl = snd_pcm_lib_ioctl, -- cgit v1.2.3