From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH] ASoC: Ensure we generate a card name Date: Tue, 20 Sep 2011 13:19:14 +0100 Message-ID: <20110920121913.GC2809@opensource.wolfsonmicro.com> References: <1316515341-21157-1-git-send-email-broonie@opensource.wolfsonmicro.com> <20110920110355.GI2387@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id B200F103A03 for ; Tue, 20 Sep 2011 14:19:16 +0200 (CEST) Content-Disposition: inline In-Reply-To: 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: Takashi Iwai Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, Liam Girdwood List-Id: alsa-devel@alsa-project.org On Tue, Sep 20, 2011 at 02:12:15PM +0200, Takashi Iwai wrote: > Mark Brown wrote: > > > Better to replace any letter except [a-zA-Z0-9_] with '_' or drop > > > them. Use isalnum(), for example. > > What *are* the rules? The documentation says "driver name" which isn't > > verbose... > It's used as an id string, so you can guess. > Practically, it should be a single word, contain no dangerous letters > that may screw up the parser. I'm inclined to just stick with the original patch then, I'd expect that anything that's problematic for the driver name is also going to be an issue in the main name field and it's a lot simpler to implement (we don't have isalnum() in kernel right now and you still need to handle _ and possibly -).