Skip to content

Commit

Permalink
ALSA: atmel: 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 28f0548 commit 1086373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/atmel/ac97c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 1086373

Please sign in to comment.