[alsa-devel] [PATCH] ASoC: Ensure we generate a driver name

Takashi Iwai tiwai at suse.de
Tue Sep 20 16:02:05 CEST 2011


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 <tiwai at suse.de>


thanks,

Takashi


More information about the Alsa-devel mailing list