From patchwork Fri May 20 09:54:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9129077 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0FF276048B for ; Fri, 20 May 2016 09:54:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02AD41FF6C for ; Fri, 20 May 2016 09:54:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBBA42793B; Fri, 20 May 2016 09:54:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FEF51FF6C for ; Fri, 20 May 2016 09:54:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751043AbcETJyN (ORCPT ); Fri, 20 May 2016 05:54:13 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:59206 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752075AbcETJyK (ORCPT ); Fri, 20 May 2016 05:54:10 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie3.idc.renesas.com with ESMTP; 20 May 2016 18:54:09 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 1D57652DF8; Fri, 20 May 2016 18:54:09 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id F303A480A4; Fri, 20 May 2016 18:54:08 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id E9C6F480A3; Fri, 20 May 2016 18:54:08 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id UAN05314; Fri, 20 May 2016 18:54:08 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211273151" Received: from mail-pu1apc01lp0019.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.19]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 20 May 2016 18:54:08 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=IsOkH/COZsAUhOAIiNpuXDbPhUWQQf+2k8KID28nFrQ=; b=bZ47cPw69eN/n45SZYpn67cfDiyttfzxhdvoeSWT7alljk/xtE/Jim8mngvXJ9R5CnbGG4B1cHJ8MpWKz0WihdgiyqNl/0ifNZ58ntgGJv2Zt4U0W2zaoXuBHmv7ekqnd/MC9rLgKylT7QBOojM71COBQI9rJ/sej5mHfDve/kE= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by SG2PR06MB1709.apcprd06.prod.outlook.com (10.167.82.139) with Microsoft SMTP Server (TLS) id 15.1.497.12; Fri, 20 May 2016 09:54:06 +0000 Message-ID: <87mvnlqcvp.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 23/49] ASoC: simple-card: use asoc_simple_card_parse_tdm() User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown CC: Linux-ALSA , Liam Girdwood , Simon , In-Reply-To: <87lh35rs8w.wl%kuninori.morimoto.gx@renesas.com> References: <87lh35rs8w.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 20 May 2016 09:54:06 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR0101CA0005.jpnprd01.prod.outlook.com (10.168.40.143) To SG2PR06MB1709.apcprd06.prod.outlook.com (10.167.82.139) X-MS-Office365-Filtering-Correlation-Id: b3ad17d8-139b-468c-4442-08d38094af12 X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 2:j/f8CkQvOEljpWum1kB4lO9Z7W0raGgi/oLJEdNoL6gXPAxSch1Xr0N1qMYQvdyAdOugWz1BxGFLCKARNOXXLhwoFWlkiKUCVs8OEnFZJKle5oQEiIMzKXklUEBsc/CUOVddZI3yTStucvMWsi2J18vkirRPQswOKFh4AacY5cy17cl8C/GA1pScYpeYjv8X; 3:Vf+n2/3WkeBihOFeoo1m3x/4251AzouSKFgJhqasNA6FNAPGLkwWaHhQXpbEQX/cclgcfn7CvIDIW9Z0bUwzVC8GEOBKzUBaF4qDCkhM4DDQbC+N/oq2XMiFsPVhr/cj X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB1709; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 25:QsxFUp1tn0Z3nlHelrsTNoJiYJx3doJtLrvrKIY+EJ8NdukbtMiIUHveAplrqN0ZMc/X6cz9VJHflu3f/YUUbPoJ+H2D0ysTbjwm+mfWi9BsdHx+har7occM3O+isxkYMGZS5G/8XRCkXJa3Pf0XoIesc44Bp4PZ9dvHauv3uTX/G9qIY351mxnlHlHnojm36Ua1v4eKqpq2YyETee082EjksGfTnimgVRbA67CulV8l2x/IGxVOitbeACuJTrYFGGQ/hJ8eKH019N0v7petD7ypPUsIL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d0tWKcbIM1kLiiqnZdN7vqVjWqYadWM5q4f5IlPWUvpNCLRHQeaOP+BJbEazMAJpupRvOvHClnGtvnuZ9zN6uvy5Oa3vcQhlE4iwYm8GqC75LMvTmVrF4ug8PGPLutn8+HcVC6H6H0PuUEwU5nu+MQWv2+4Q84AVWIdp5kfuwgjShkf52Au2/xou9fd5HUDs47cVUjNeuF9qcbW4bksr+vdcjFatA5P39fQa9358xr2qPiYXYrtz4p/VRFcRkkQPjuwpSkN7BGVejB8dUtmG8X2H9LtBTat/MoWgUU9K70mWqq0Gx3TpyS/BSA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:SG2PR06MB1709; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB1709; X-Forefront-PRVS: 09480768F8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(2906002)(229853001)(33646002)(4326007)(53416004)(8676002)(77096005)(76176999)(54356999)(81166006)(42186005)(2950100001)(86362001)(5004730100002)(47776003)(5008740100001)(36756003)(92566002)(83506001)(50466002)(66066001)(3846002)(23726003)(6116002)(189998001)(19580395003)(110136002)(50986999)(586003)(46406003)(19580405001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB1709; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 23:gDx0cR+WMCflLdCgwJ2f1t8t+Eng3vx3kcEGr0N96V3h8bAUFUZaYc0qJx65NJINjrDW3BOh9dIjm5hepmSpcwIMblf/vgsXm8FvbboboozSLDsO69fOmPnaauw4hls8fPOr/UydL5H6CoDj2kDDSCMDRDUCUi6NzspM+6/l51rOjN5NtmQa+FpE4JwVkqDLRAR7mtjF3S5BSvhDRsxQd09OFwavwoH+SHk2Ya18iX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QOd4FrNzBmy8tuKwgErPIG2FdzHU4WYpFMHtG7vJDrBdHd7s6xnqV8ee+Z8Dve18Nmp8soGP3V9SjR9911H+TnBAkiDmkcmHagWc5uqdHZwzx58E35iTIDuO; 20:C5UAHvKqwbQ0JmGaf9I+zyT8BsZsKgqR9tsrXznENPF9B4fTURkU21CH6SorNywbeaiaO6MJt2cK/n+YwdghHfXwFaj8b4UyRBrfHu6NsVMax5nuHAzqGlS6LcWpXKTERhiLAnkE6F424isytV5HClFnKRlOd2OaYX9xs+ig83s= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2016 09:54:06.4471 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1709 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto --- sound/soc/generic/simple-card.c | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index aa7c7ef..56a8938 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -212,31 +212,6 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd) return 0; } -static int -asoc_simple_card_sub_parse_of(struct device_node *np, - struct asoc_simple_dai *dai, - struct device_node **p_node, - const char **name, - int *args_count) -{ - int ret; - - if (!np) - return 0; - - if (!dai) - return 0; - - /* Parse TDM slot */ - ret = snd_soc_of_parse_tdm_slot(np, &dai->tx_slot_mask, - &dai->rx_slot_mask, - &dai->slots, &dai->slot_width); - if (ret) - return ret; - - return 0; -} - static int asoc_simple_card_dai_link_of(struct device_node *node, struct simple_card_data *priv, int idx, @@ -296,22 +271,11 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, if (ret < 0) goto dai_link_of_err; - ret = asoc_simple_card_sub_parse_of(cpu, &dai_props->cpu_dai, - &dai_link->cpu_of_node, - &dai_link->cpu_dai_name, - &single_cpu); - if (ret < 0) - goto dai_link_of_err; - - ret = asoc_simple_card_sub_parse_of(codec, &dai_props->codec_dai, - &dai_link->codec_of_node, - &dai_link->codec_dai_name, NULL); + ret = asoc_simple_card_parse_tdm(cpu, cpu_dai); if (ret < 0) goto dai_link_of_err; - ret = asoc_simple_card_sub_parse_of(plat, NULL, - &dai_link->platform_of_node, - NULL, NULL); + ret = asoc_simple_card_parse_tdm(codec, codec_dai); if (ret < 0) goto dai_link_of_err;