diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-08-10 07:47:34 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-08-10 11:56:06 -0400 |
commit | afa04880f46bbf84a90ac508c752b7ed0d76f8be (patch) | |
tree | 2fb59b899242ea23f3d424ebb4475428e32301de /sound/pci/echoaudio | |
parent | 0b5b233915b6ea8042f9dbb725a94e185dada530 (diff) |
ALSA: echoaudio: 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/pci/echoaudio')
-rw-r--r-- | sound/pci/echoaudio/echoaudio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index d15ecf9febbf..7326695bca33 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c | |||
@@ -826,7 +826,7 @@ static snd_pcm_uframes_t pcm_pointer(struct snd_pcm_substream *substream) | |||
826 | 826 | ||
827 | 827 | ||
828 | /* pcm *_ops structures */ | 828 | /* pcm *_ops structures */ |
829 | static struct snd_pcm_ops analog_playback_ops = { | 829 | static const struct snd_pcm_ops analog_playback_ops = { |
830 | .open = pcm_analog_out_open, | 830 | .open = pcm_analog_out_open, |
831 | .close = pcm_close, | 831 | .close = pcm_close, |
832 | .ioctl = snd_pcm_lib_ioctl, | 832 | .ioctl = snd_pcm_lib_ioctl, |
@@ -837,7 +837,7 @@ static struct snd_pcm_ops analog_playback_ops = { | |||
837 | .pointer = pcm_pointer, | 837 | .pointer = pcm_pointer, |
838 | .page = snd_pcm_sgbuf_ops_page, | 838 | .page = snd_pcm_sgbuf_ops_page, |
839 | }; | 839 | }; |
840 | static struct snd_pcm_ops analog_capture_ops = { | 840 | static const struct snd_pcm_ops analog_capture_ops = { |
841 | .open = pcm_analog_in_open, | 841 | .open = pcm_analog_in_open, |
842 | .close = pcm_close, | 842 | .close = pcm_close, |
843 | .ioctl = snd_pcm_lib_ioctl, | 843 | .ioctl = snd_pcm_lib_ioctl, |
@@ -850,7 +850,7 @@ static struct snd_pcm_ops analog_capture_ops = { | |||
850 | }; | 850 | }; |
851 | #ifdef ECHOCARD_HAS_DIGITAL_IO | 851 | #ifdef ECHOCARD_HAS_DIGITAL_IO |
852 | #ifndef ECHOCARD_HAS_VMIXER | 852 | #ifndef ECHOCARD_HAS_VMIXER |
853 | static struct snd_pcm_ops digital_playback_ops = { | 853 | static const struct snd_pcm_ops digital_playback_ops = { |
854 | .open = pcm_digital_out_open, | 854 | .open = pcm_digital_out_open, |
855 | .close = pcm_close, | 855 | .close = pcm_close, |
856 | .ioctl = snd_pcm_lib_ioctl, | 856 | .ioctl = snd_pcm_lib_ioctl, |
@@ -862,7 +862,7 @@ static struct snd_pcm_ops digital_playback_ops = { | |||
862 | .page = snd_pcm_sgbuf_ops_page, | 862 | .page = snd_pcm_sgbuf_ops_page, |
863 | }; | 863 | }; |
864 | #endif /* !ECHOCARD_HAS_VMIXER */ | 864 | #endif /* !ECHOCARD_HAS_VMIXER */ |
865 | static struct snd_pcm_ops digital_capture_ops = { | 865 | static const struct snd_pcm_ops digital_capture_ops = { |
866 | .open = pcm_digital_in_open, | 866 | .open = pcm_digital_in_open, |
867 | .close = pcm_close, | 867 | .close = pcm_close, |
868 | .ioctl = snd_pcm_lib_ioctl, | 868 | .ioctl = snd_pcm_lib_ioctl, |