From patchwork Thu Apr 24 16:42:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 4052871 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7D2729F387 for ; Thu, 24 Apr 2014 16:42:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7DC020306 for ; Thu, 24 Apr 2014 16:42:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7314E202F0 for ; Thu, 24 Apr 2014 16:42:29 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id DB2EF265308; Thu, 24 Apr 2014 18:42:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 04F9F2652E9; Thu, 24 Apr 2014 18:42:18 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id E98EE2652ED; Thu, 24 Apr 2014 18:42:16 +0200 (CEST) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by alsa0.perex.cz (Postfix) with ESMTP id D858B2652E9 for ; Thu, 24 Apr 2014 18:42:08 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3OGg4Qq014857; Thu, 24 Apr 2014 11:42:04 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3OGg3KK026318; Thu, 24 Apr 2014 11:42:03 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Thu, 24 Apr 2014 11:42:03 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3OGg2An012253; Thu, 24 Apr 2014 11:42:02 -0500 From: Jyri Sarha To: Date: Thu, 24 Apr 2014 19:42:00 +0300 Message-ID: <1398357720-2000-1-git-send-email-jsarha@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Cc: moinejf@free.fr, kuninori.morimoto.gx@renesas.com, tiwai@suse.de, lgirdwood@gmail.com, Jyri Sarha , broonie@kernel.org, Guangyu.Chen@freescale.com Subject: [alsa-devel] [PATCH] ASoC: simple-card: is_top_level_node parameter to simple_card_dai_link_of() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Restore correct parsing of dai-link subnodes with more explicit implementation for applying the "simple-audio-card,"-prefix to dai-link property and subnode names. Signed-off-by: Jyri Sarha --- sound/soc/generic/simple-card.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 98f97e5..06fe0e2 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -144,7 +144,8 @@ asoc_simple_card_sub_parse_of(struct device_node *np, static int simple_card_dai_link_of(struct device_node *node, struct device *dev, struct snd_soc_dai_link *dai_link, - struct simple_dai_props *dai_props) + struct simple_dai_props *dai_props, + bool is_top_level_node) { struct device_node *np = NULL; struct device_node *bitclkmaster = NULL; @@ -155,7 +156,8 @@ static int simple_card_dai_link_of(struct device_node *node, char *prefix = ""; int ret; - prefix = "simple-audio-card,"; + if (is_top_level_node) + prefix = "simple-audio-card,"; daifmt = snd_soc_of_parse_daifmt(node, prefix, &bitclkmaster, &framemaster); @@ -307,14 +309,15 @@ static int asoc_simple_card_parse_of(struct device_node *node, for (i = 0; (np = of_get_next_child(node, np)); i++) { dev_dbg(dev, "\tlink %d:\n", i); ret = simple_card_dai_link_of(np, dev, dai_link + i, - dai_props + i); + dai_props + i, false); if (ret < 0) { of_node_put(np); return ret; } } } else { - ret = simple_card_dai_link_of(node, dev, dai_link, dai_props); + ret = simple_card_dai_link_of(node, dev, dai_link, dai_props, + true); if (ret < 0) return ret; }