[alsa-devel] [PATCH] ASoC: Ensure we generate a driver name
Mark Brown
broonie at opensource.wolfsonmicro.com
Tue Sep 20 15:52:28 CEST 2011
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?
More information about the Alsa-devel
mailing list