diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-05-24 15:18:10 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-05-24 15:41:44 +0200 |
commit | e6c2e7eb27fc512af6875d7f2cf313e29c61be0b (patch) | |
tree | 6e254e4b5b673569b2910fb2a6d7a16c86298308 /sound/core | |
parent | 3cf981484a002fd02c410741d30b234227f89568 (diff) |
ALSA: Constify the snd_pcm_substream struct ops field
The ops field of the snd_pcm_substream struct is never modified inside the ALSA
core. Making it const allows drivers to declare their snd_pcm_ops struct as
const.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 41b3dfe6869..82bb029d441 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -568,7 +568,8 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream) * * Sets the given PCM operators to the pcm instance. */ -void snd_pcm_set_ops(struct snd_pcm *pcm, int direction, struct snd_pcm_ops *ops) +void snd_pcm_set_ops(struct snd_pcm *pcm, int direction, + const struct snd_pcm_ops *ops) { struct snd_pcm_str *stream = &pcm->streams[direction]; struct snd_pcm_substream *substream; |