ALSA: pcm: Make constraints lists const
PATCH 1/1 ALSA: pcm: Make constraints lists const
They aren't modified by the core so the drivers can declare them const.
Signed-off-by Mark Brown <[email protected]>
--- include/sound/pcm.h | 2 +- sound/core/pcm_lib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/sound/pcm.h +1 -1
@@ -810,7 +810,7 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_paint snd_pcm_hw_constraint_list (struct snd_pcm_runtime *runtime,unsigned int cond,snd_pcm_hw_param_t var, -struct snd_pcm_hw_constraint_list *l); +const struct snd_pcm_hw_constraint_list *l); int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, unsigned int cond, snd_pcm_hw_param_t var,
sound/core/pcm_lib.c +1 -1
@@ -1253,7 +1253,7 @@ int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, struct snd_pcm_hw_constraint_list *l) {return snd_pcm_hw_rule_add (runtime, cond, var, - snd_pcm_hw_rule_list, l, + snd_pcm_hw_rule_list, (void *)l, var,-1 ); }
Signature · 1 line
1.7.10
Takashi Iwai
AppliedAt Thu, 5 Jul 2012 12:15:01 +0100,
Quoted 4 lines · Mark Brown
They aren't modified by the core so the drivers can declare them const.
Signed-off-by Mark Brown <[email protected]>
Thanks, applied (with the missing const in pcm_lib.c).
Takashi
Quoted 34 lines
--- include/sound/pcm.h | 2 +- sound/core/pcm_lib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)include/sound/pcm.h +1
-1@@ -810,7 +810,7 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_paint snd_pcm_hw_constraint_list (struct snd_pcm_runtime *runtime,unsigned int cond,snd_pcm_hw_param_t var, -struct snd_pcm_hw_constraint_list *l); +const struct snd_pcm_hw_constraint_list *l); int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, unsigned int cond, snd_pcm_hw_param_t var,sound/core/pcm_lib.c +1
-1@@ -1253,7 +1253,7 @@ int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, struct snd_pcm_hw_constraint_list *l) {return snd_pcm_hw_rule_add (runtime, cond, var, - snd_pcm_hw_rule_list, l, + snd_pcm_hw_rule_list, (void *)l, var,-1 ); }Signature · 1 line
1.7.10