ALSA: cs5535audio: constify cs5535audio_dma_ops structures
Subsystems (3)
PATCH 1/1 ALSA: cs5535audio: constify cs5535audio_dma_ops structures
The cs5535audio_dma_ops structures are never modified, so declare them as const.
Done with the help of Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
--- sound/pci/cs5535audio/cs5535audio_pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/cs5535audio/cs5535audio_pcm.c +2 -2
@@ -402,7 +402,7 @@ static struct snd_pcm_ops snd_cs5535audio_capture_ops = { .pointer = snd_cs5535audio_pcm_pointer, }; -static struct cs5535audio_dma_ops snd_cs5535audio_playback_dma_ops = { +static const struct cs5535audio_dma_ops snd_cs5535audio_playback_dma_ops = { .type =CS5535AUDIO_DMA_PLAYBACK , .enable_dma = cs5535audio_playback_enable_dma, .disable_dma = cs5535audio_playback_disable_dma,
@@ -412,7 +412,7 @@ static struct cs5535audio_dma_ops snd_cs5535audio_playback_dma_ops = { .read_dma_pntr = cs5535audio_playback_read_dma_pntr, }; -static struct cs5535audio_dma_ops snd_cs5535audio_capture_dma_ops = { +static const struct cs5535audio_dma_ops snd_cs5535audio_capture_dma_ops = { .type =CS5535AUDIO_DMA_CAPTURE , .enable_dma = cs5535audio_capture_enable_dma, .disable_dma = cs5535audio_capture_disable_dma,
Takashi Iwai
AppliedQuoted 7 lines · Julia Lawall
The
cs5535audio_dma_opsstructures are never modified, so declare them as const.Done with the help of Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Applied, thanks.
Takashi
Quoted 29 lines
--- sound/pci/cs5535audio/cs5535audio_pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)sound/pci/cs5535audio/cs5535audio_pcm.c +2
-2@@ -402,7 +402,7 @@ static struct snd_pcm_ops snd_cs5535audio_capture_ops = { .pointer = snd_cs5535audio_pcm_pointer, }; -static struct cs5535audio_dma_ops snd_cs5535audio_playback_dma_ops = { +static const struct cs5535audio_dma_ops snd_cs5535audio_playback_dma_ops = { .type =CS5535AUDIO_DMA_PLAYBACK , .enable_dma = cs5535audio_playback_enable_dma, .disable_dma = cs5535audio_playback_disable_dma,@@ -412,7 +412,7 @@ static struct cs5535audio_dma_ops snd_cs5535audio_playback_dma_ops = { .read_dma_pntr = cs5535audio_playback_read_dma_pntr, }; -static struct cs5535audio_dma_ops snd_cs5535audio_capture_dma_ops = { +static const struct cs5535audio_dma_ops snd_cs5535audio_capture_dma_ops = { .type =CS5535AUDIO_DMA_CAPTURE , .enable_dma = cs5535audio_capture_enable_dma, .disable_dma = cs5535audio_capture_disable_dma,