[alsa-devel] [PATCH 1/8] ALSA: core: Constify the name in new kcontrols

Liam Girdwood lrg at ti.com
Fri Feb 17 10:50:30 CET 2012


On Thu, 2012-02-16 at 21:56 -0800, Mark Brown wrote:
> We never modify it and this lets us use a const string as the name without
> warnings.
> 
> Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> ---
>  include/sound/control.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/sound/control.h b/include/sound/control.h
> index b2796e8..57815f6 100644
> --- a/include/sound/control.h
> +++ b/include/sound/control.h
> @@ -40,7 +40,7 @@ struct snd_kcontrol_new {
>  	snd_ctl_elem_iface_t iface;	/* interface identifier */
>  	unsigned int device;		/* device/client number */
>  	unsigned int subdevice;		/* subdevice (substream) number */
> -	unsigned char *name;		/* ASCII name of item */
> +	const unsigned char *name;	/* ASCII name of item */
>  	unsigned int index;		/* index of item */
>  	unsigned int access;		/* access rights */
>  	unsigned int count;		/* count of same elements */

All 

Acked-by: Liam Girdwood <lrg at ti.com>

I'll do some incremental updates for platform and ABE support.

Liam



More information about the Alsa-devel mailing list