summaryrefslogtreecommitdiffstats
path: root/sound/usb/misc
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-08-18 13:15:21 +0530
committerTakashi Iwai <tiwai@suse.de>2017-08-19 11:02:27 +0200
commit31cb1fb41df3b871d337544ed5199a135e606f69 (patch)
tree1aa74f5af6cd1377837eeb63f08d8e52f24a62c5 /sound/usb/misc
parent7a205f5db56d9055ff368ab5103275d0164a41c8 (diff)
downloadlinux-31cb1fb41df3b871d337544ed5199a135e606f69.tar.gz
linux-31cb1fb41df3b871d337544ed5199a135e606f69.tar.xz
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>
Diffstat (limited to 'sound/usb/misc')
-rw-r--r--sound/usb/misc/ua101.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/misc/ua101.c b/sound/usb/misc/ua101.c
index b05cd38400ff..386fbfd5c617 100644
--- a/sound/usb/misc/ua101.c
+++ b/sound/usb/misc/ua101.c
@@ -890,7 +890,7 @@ static snd_pcm_uframes_t playback_pcm_pointer(struct snd_pcm_substream *subs)
return ua101_pcm_pointer(ua, &ua->playback);
}
-static struct snd_pcm_ops capture_pcm_ops = {
+static const struct snd_pcm_ops capture_pcm_ops = {
.open = capture_pcm_open,
.close = capture_pcm_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -903,7 +903,7 @@ static struct snd_pcm_ops capture_pcm_ops = {
.mmap = snd_pcm_lib_mmap_vmalloc,
};
-static struct snd_pcm_ops playback_pcm_ops = {
+static const struct snd_pcm_ops playback_pcm_ops = {
.open = playback_pcm_open,
.close = playback_pcm_close,
.ioctl = snd_pcm_lib_ioctl,