Skip to content

Commit

Permalink
ALSA: parisc: constify snd_pcm_ops structures
Browse files Browse the repository at this point in the history
snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
ArvindYadavCs authored and tiwai committed Aug 19, 2017
1 parent 915a38d commit c2992b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/parisc/harmony.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ snd_harmony_hw_free(struct snd_pcm_substream *ss)
return snd_pcm_lib_free_pages(ss);
}

static struct snd_pcm_ops snd_harmony_playback_ops = {
static const struct snd_pcm_ops snd_harmony_playback_ops = {
.open = snd_harmony_playback_open,
.close = snd_harmony_playback_close,
.ioctl = snd_pcm_lib_ioctl,
Expand All @@ -607,7 +607,7 @@ static struct snd_pcm_ops snd_harmony_playback_ops = {
.pointer = snd_harmony_playback_pointer,
};

static struct snd_pcm_ops snd_harmony_capture_ops = {
static const struct snd_pcm_ops snd_harmony_capture_ops = {
.open = snd_harmony_capture_open,
.close = snd_harmony_capture_close,
.ioctl = snd_pcm_lib_ioctl,
Expand Down

0 comments on commit c2992b1

Please sign in to comment.