All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: pcm: Make constraints lists const
@ 2012-07-05 11:15 Mark Brown
  2012-07-05 12:23 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-07-05 11:15 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai; +Cc: alsa-devel, Mark Brown

They aren't modified by the core so the drivers can declare them const.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/sound/pcm.h  |    2 +-
 sound/core/pcm_lib.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index e7afcc9..c75c0d1 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -810,7 +810,7 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_pa
 int 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,
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 8f312fa6..8659bc5 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -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);
 }
 
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: pcm: Make constraints lists const
  2012-07-05 11:15 [PATCH] ALSA: pcm: Make constraints lists const Mark Brown
@ 2012-07-05 12:23 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2012-07-05 12:23 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

At Thu,  5 Jul 2012 12:15:01 +0100,
Mark Brown wrote:
> 
> They aren't modified by the core so the drivers can declare them const.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Thanks, applied (with the missing const in pcm_lib.c).


Takashi

> ---
>  include/sound/pcm.h  |    2 +-
>  sound/core/pcm_lib.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/sound/pcm.h b/include/sound/pcm.h
> index e7afcc9..c75c0d1 100644
> --- a/include/sound/pcm.h
> +++ b/include/sound/pcm.h
> @@ -810,7 +810,7 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_pa
>  int 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,
> diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
> index 8f312fa6..8659bc5 100644
> --- a/sound/core/pcm_lib.c
> +++ b/sound/core/pcm_lib.c
> @@ -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);
>  }
>  
> -- 
> 1.7.10
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-05 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-05 11:15 [PATCH] ALSA: pcm: Make constraints lists const Mark Brown
2012-07-05 12:23 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.