Skip to content

Commit cd0305d

Browse files
ArvindYadavCsnumbqq
authored andcommitted
UPSTREAM: usb: gadget: f_uac2: 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. Change-Id: I0efbb6c4563dbced2154008914d0c7f6fbb8f134 Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: William Wu <[email protected]> (cherry picked from commit b765ff1)
1 parent c3994df commit cd0305d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/function/u_audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static int uac_pcm_null(struct snd_pcm_substream *substream)
354354
return 0;
355355
}
356356

357-
static struct snd_pcm_ops uac_pcm_ops = {
357+
static const struct snd_pcm_ops uac_pcm_ops = {
358358
.open = uac_pcm_open,
359359
.close = uac_pcm_null,
360360
.ioctl = snd_pcm_lib_ioctl,

0 commit comments

Comments
 (0)