ALSA: usb: constify snd_pcm_ops structures
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 <arvind.yadav.cs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Takashi Iwai

parent
7a205f5db5
commit
31cb1fb41d
@@ -513,7 +513,7 @@ static snd_pcm_uframes_t hiface_pcm_pointer(struct snd_pcm_substream *alsa_sub)
|
||||
return bytes_to_frames(alsa_sub->runtime, dma_offset);
|
||||
}
|
||||
|
||||
static struct snd_pcm_ops pcm_ops = {
|
||||
static const struct snd_pcm_ops pcm_ops = {
|
||||
.open = hiface_pcm_open,
|
||||
.close = hiface_pcm_close,
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
|
Reference in New Issue
Block a user