From patchwork Tue May 31 09:06:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9143893 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 ABF5F60757 for ; Tue, 31 May 2016 09:06:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A019225D97 for ; Tue, 31 May 2016 09:06:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94C1427D17; Tue, 31 May 2016 09:06:32 +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 0FA6F25D97 for ; Tue, 31 May 2016 09:06:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756873AbcEaJGZ (ORCPT ); Tue, 31 May 2016 05:06:25 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:16735 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755920AbcEaJGV (ORCPT ); Tue, 31 May 2016 05:06:21 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 31 May 2016 18:06:19 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id E3CB4611F3; Tue, 31 May 2016 18:06:19 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id E4B7018070; Tue, 31 May 2016 18:06:19 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 910D918083; Tue, 31 May 2016 18:06:19 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id UAB11039; Tue, 31 May 2016 18:06:19 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211980751" Received: from mail-sg2apc01lp0247.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.247]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 31 May 2016 18:06:18 +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=vBIBvQFyGSVHrce4TzqvUE7XAI+svHrmnWbfeids2tw=; b=a0xDwJZ57WhOA9peO095gH4yBzECtF/jAE7+B6whLYf7YgF3WKQNvE1nAUM6HmZUJdBlHzFqjbxst+gDx3Nok5jsJGXwMz2LFJuyKPTvU+An9fQ8tFEFMy012hvNT/sam5+l/Z2ua/rz0QwuHll++DoLxzH3Pgh854gbbKFRjoY= 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 SG2PR06MB1711.apcprd06.prod.outlook.com (10.167.82.141) with Microsoft SMTP Server (TLS) id 15.1.506.9; Tue, 31 May 2016 09:06:13 +0000 Message-ID: <87pos2r4ah.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 18/39 v2] 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: <87fusysjam.wl%kuninori.morimoto.gx@renesas.com> References: <87fusysjam.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Tue, 31 May 2016 09:06:13 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0085.jpnprd01.prod.outlook.com (10.167.153.173) To SG2PR06MB1711.apcprd06.prod.outlook.com (10.167.82.141) X-MS-Office365-Filtering-Correlation-Id: 9af9dcd1-b70b-4c34-0568-08d38932d179 X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1711; 2:XygZA2fOPPsM8q9kg3czPD2k9ShsSAM9wJluk4VFm5UjxmWt6fQGeOZh4siEMKiuKzKfBGEKtaUhpVeMQYfrTmR9uZjyIof1VUmRYoxuZt8rX2E1fZJrMGaMQ9gLWyF4fimMV9l2GOcQX2nk4TTljjOgwANNnNYbWnoQ628fWuRRSqYhrDeITvzeJ7tIaOhv; 3:zlSe9ulFDfqFfIYHnQGTU8LSqiffb40t18GJCH8FY9skhgtTvNbYF7EqVD16UdQ43T81yPZMI1hjqNmacO/ctOqkjxVVVGtcHVBIRaggl1+fXSNos+hlfGfzpiEWFWBj; 25:+RcdUiF+IZh3q7Ck8175kdS5rpr/iNOn4nj4kkjQwesGC32LFivvWC6PbJrFgyo5MmI0tZiG5nLhXrhd8La3Smf5L4Y1/H30EhjOksSc3xhhIxWxSHO4KQ2WEDa3p58583GVCvTd0y3ramMAvA39uXlN10rkXkw0Of1Kk4S/yXuFVVlxPWeZRfzEWX0qltZfPwyuFBLrCIcPaZA/Go33wMWdbnGShlFjI5lyZkbCrTvj2v/X27J+4Zu6JfdKDXKvZgj/U966VCvF3IIHUY2QTgY+tJ1ITc5E1N2U03JHrPJkPf8V6hm2iSERVUHJKABcePqvavcbtqJXqUmBe4Fh1d22Y4gqURJf1eUmdhBA1AFCvPvmGv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ltg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:SG2PR06MB1711; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB1711; X-Forefront-PRVS: 095972DF2F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(575784001)(586003)(5004730100002)(86362001)(4001350100001)(77096005)(23726003)(92566002)(81166006)(2950100001)(36756003)(46406003)(50986999)(66066001)(33646002)(6116002)(8676002)(5008740100001)(76176999)(3846002)(229853001)(189998001)(19580405001)(54356999)(50466002)(19580395003)(42186005)(4326007)(110136002)(53416004)(2906002)(83506001)(47776003)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB1711; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB1711; 23:piUAn8aSxGzRbLhZqK7OOF+K19fp1FiPJKqLpFoX+?= =?us-ascii?Q?o5g/d4xNdj2gOy+0vfr98p38fblX6hsxarmXahTkNV7XqJMKmE+fuuZ85elP?= =?us-ascii?Q?lfg2z+Ok3LjXinRAnBZfiL4QSYigb2sO4BEQQjUYfUKqzKVADnv8WS6AEGXY?= =?us-ascii?Q?XxrgDCHY5jr3hlGPSVi2vlklKA5E3UHcyQ4GGOBZUjz3aRIM4OSHlh51C7vk?= =?us-ascii?Q?QYKqsQFoksxdVL3QI4PiwybzBdfmHp90Jz7yGP0wm37IhiFZNh0l+h+Ae2jO?= =?us-ascii?Q?c1MvyUXqbCHZT3DINx8RAGt4L0KxWjUnbZmpTLvPNZa+LvhsfvCAagTy09eZ?= =?us-ascii?Q?JkogBWwo6lubwMjGWPxYgoD2+o3m2nJr+UEZ3as3bRmGpxlVDihVBWWNXOwN?= =?us-ascii?Q?RRzUi/MUCOYg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ySzi7bTXC1zrcv4sPgCpWtegemch11hx/R+8iZKXwIsP1/ZDOVmRO7ghiQW4zP3VdNPOO8/dHzUYL5IPvKXru6CvgqLkVdp/W/WR0RwB2pzWU2DTWienRMQRz/VfegKwbuDCdLuAXB5cF85tggwy+Q/OzU9hCxjlyXE2O0Zc; 20:VJs0KrjQsnP6uOPEUjmrTkHN8Upq9EgNqnc/xTqEgX4ca4kYs1rXXjGwyB6yfNRjVZSgXuX6SqkiaEp9RGQf1Li3SsI9tNVtrY3t8/EdDYU+k34+zETbUkywnHpUPcVvmOhgVoKHGq9t6Da/rfeECyRV+GS/uxipU1dTWkPP0T0= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2016 09:06:13.9173 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1711 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 f0f45bf..2aa21a4 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -238,31 +238,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, @@ -322,22 +297,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;