summaryrefslogtreecommitdiff
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2017-05-17 02:48:20 +0300
committerTakashi Iwai <tiwai@suse.de>2017-05-17 08:24:39 +0300
commitb55f9fdcd3f0b3da7c9d4b6c67d75a1878653221 (patch)
tree207f922b47ed7bbd0086f2bd42c1a9deec88585c /sound/core/pcm_native.c
parent8b674308a26a774896652dafe0dac7ee297eed9b (diff)
downloadlinux-b55f9fdcd3f0b3da7c9d4b6c67d75a1878653221.tar.xz
ALSA: pcm: use helper function to refer parameter as read-only
ALSA pcm core has hw_param_interval_c() to pick up parameter with const qualifier for safe programming. This commit applies it to the cases. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index d5a967b57bb4..f3a3580eb44c 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1940,7 +1940,8 @@ static int snd_pcm_hw_rule_format(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{
unsigned int k;
- struct snd_interval *i = hw_param_interval(params, rule->deps[0]);
+ const struct snd_interval *i =
+ hw_param_interval_c(params, rule->deps[0]);
struct snd_mask m;
struct snd_mask *mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
snd_mask_any(&m);