ALSA: trident: constify snd_pcm_ops structures
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 10 Aug 2017 11:47:38 +0000 (17:17 +0530)
committerTakashi Iwai <tiwai@suse.de>
Thu, 10 Aug 2017 15:56:11 +0000 (17:56 +0200)
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>
sound/pci/trident/trident_main.c

index 64d3b8eba4bb55cab9c8aa6959d252a101b6d021..4561040520c23150552c31bada1519b3ba9c177f 100644 (file)
@@ -2093,7 +2093,7 @@ static const struct snd_pcm_ops snd_trident_nx_playback_ops = {
        .page =         snd_pcm_sgbuf_ops_page,
 };
 
-static struct snd_pcm_ops snd_trident_capture_ops = {
+static const struct snd_pcm_ops snd_trident_capture_ops = {
        .open =         snd_trident_capture_open,
        .close =        snd_trident_capture_close,
        .ioctl =        snd_trident_ioctl,
@@ -2104,7 +2104,7 @@ static struct snd_pcm_ops snd_trident_capture_ops = {
        .pointer =      snd_trident_capture_pointer,
 };
 
-static struct snd_pcm_ops snd_trident_si7018_capture_ops = {
+static const struct snd_pcm_ops snd_trident_si7018_capture_ops = {
        .open =         snd_trident_capture_open,
        .close =        snd_trident_capture_close,
        .ioctl =        snd_trident_ioctl,