From: Takashi Iwai Subject: Re: [PATCH] ASoC: Ensure we generate a driver name Date: Tue, 20 Sep 2011 16:02:05 +0200 Message-ID: References: <1316523514-21967-1-git-send-email-broonie@opensource.wolfsonmicro.com> <20110920131804.GE2809@opensource.wolfsonmicro.com> <20110920135228.GA2974@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 A21C71039BC for ; Tue, 20 Sep 2011 16:02:08 +0200 (CEST) In-Reply-To: <20110920135228.GA2974@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 Tue, 20 Sep 2011 14:52:28 +0100, Mark Brown wrote: > > On Tue, Sep 20, 2011 at 03:32:48PM +0200, Takashi Iwai wrote: > > Mark Brown wrote: > > > > *sigh* This sort of issue is why I'd prefer to just squash specific > > > characters, especially given that we're just being random about what a > > > valid character is. > > > Heh. Or just use a char *, such as > > > char *p; > > ... > > for (p = card->snd_card->driver; *p; p++) { > > if (*p != '_' && *p != '-' && !isalnum(*p)) > > *p = '_'; > > } > > I find that a bit less legible, and I do like the ARRAY_SIZE() check for > the warm and fuzzies. It's more just the listing all the characters > bit. Anyway, is the last version OK for you? Yeah, take my ack if needed. Acked-by: Takashi Iwai thanks, Takashi