From: Takashi Iwai Subject: Re: [PATCH] ALSA: core: Constify the name in new kcontrols Date: Fri, 17 Feb 2012 10:56:55 +0100 Message-ID: References: <1329440949-20353-1-git-send-email-broonie@opensource.wolfsonmicro.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 472FA24541 for ; Fri, 17 Feb 2012 10:56:58 +0100 (CET) In-Reply-To: <1329440949-20353-1-git-send-email-broonie@opensource.wolfsonmicro.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, Liam Girdwood List-Id: alsa-devel@alsa-project.org At Thu, 16 Feb 2012 17:09:09 -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 > --- > > I've got some ASoC patches which need this to avoid warnings, if you're > OK with it can I apply it via there please? Yeah, the new compile warnings by this change are only in sound/soc/*, so it makes sense to apply via asoc tree with proper fixes. In case it's needed, Reviewed-by: Takashi Iwai thanks, Takashi > > 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 */ > -- > 1.7.9.rc1 >