From patchwork Fri May 20 09:56:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9129085 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 071CA6048B for ; Fri, 20 May 2016 09:56:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED8F01FF6C for ; Fri, 20 May 2016 09:56:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E23442793B; Fri, 20 May 2016 09:56:34 +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 6487D1FF6C for ; Fri, 20 May 2016 09:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755207AbcETJ4e (ORCPT ); Fri, 20 May 2016 05:56:34 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:5431 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755186AbcETJ4d (ORCPT ); Fri, 20 May 2016 05:56:33 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 20 May 2016 18:56:31 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 9CE5552FA8; Fri, 20 May 2016 18:56:31 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 7E2101806F; Fri, 20 May 2016 18:56:31 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 774B71800A; Fri, 20 May 2016 18:56:31 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id UAT05339; Fri, 20 May 2016 18:56:31 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211273298" Received: from mail-pu1apc01lp0018.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.18]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 20 May 2016 18:56:31 +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=Qt2ElnFLeFH1yoFvt8qptismVnG14n44Vt8vpo1LQAg=; b=JnKNY9adzaUMyMt2rBd1lW7FmjohA31AqKm+q+98QyvD7WA+2ac+4iP+KR4xXErxHQpH5tpBtCEey/sk+qTR607VrdFDHtYBBaM3uKXsv/uo/0qtYNdFiD1PAdIkdyYoYPG1CkbpCYSExM+L8FsyOINOVDPL3dTj6Tb4SjmBLVQ= 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 PS1PR06MB1705.apcprd06.prod.outlook.com (10.167.53.15) with Microsoft SMTP Server (TLS) id 15.1.501.7; Fri, 20 May 2016 09:56:29 +0000 Message-ID: <87h9dtqcrq.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 27/49] ASoC: simple-card: use asoc_simple_card_parse_dailink_name() 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:56:29 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS1PR01CA0048.jpnprd01.prod.outlook.com (10.164.162.30) To PS1PR06MB1705.apcprd06.prod.outlook.com (10.167.53.15) X-MS-Office365-Filtering-Correlation-Id: 44a97154-224c-4331-1250-08d38095040d X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 2:21/CIMS79xjT+B3vKwXQBKnVAgpiod07MJqC4Ue00R4yEA44UNzlK88qtlRmXuJSwE6LhsRJb/7AAG1JocqosR6SKNp6di44Nji4jlgnM0XcoClu+flMc9jcBrpLpIpO0ELGxal6wG/qnK9Fi84UVNAzoZ9XFcFfcYgGIw+983KaM/HRlNRNsyc50lL9HkrY; 3:7kqPLtMDX6rxeyacKJmqnN9b9jrBjTFgaCyX4MrKyfG2rUoVrKU/zEXhSOFj+lm4yUkD+gEb6GPRhg9raYCPNms6X3TB7zwaaVE99gAVISwlVN2JrnGmXrU8OLHWhM+2 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:PS1PR06MB1705; X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 25:zGjS4EJi1/beGXYAG1iTz6n0lMIw3D1nGeQwS1KNm4IHuYfDPpempNjQ5XmQPRZ3cwSNqoAExRpUE+7T1w2SRXI1H9f0Na1yauqRRsLBDf2L+QAbdp4N3r7FPpJHBV0q4gjZOxtxOOW72u8oWwwEOlEmIS6hF9wQrN4zdi2QQ5b/CXtu4fIsOieqwXL3kIZcLEJWKzl8il7/pdN9UB3aNNghMbzoxMFdZfYp/MadU1zi1q4FvYP5sorv8v4ck7ZwXl3wXBPrvqTQhUp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YlKGhZuMtWzCZVNqizv+GPWuyekBUvfRIOLZdk/rnDH39bDMLyLNPkN5x9pRf0kMPpZOejAozl1th7tiypG6kMzXIwc8DsmHLG51tdc2ZD/6nMYsSLhTKikIY9ePNgVr4j5X723L1EiOQRyPWHleuOs7SuJUZxZlxvYSZ30fut0A2yvyvBAWu6e9c/6Iq/CgTCo5nM1GayDdSondwG45he+Mmrz/LajNvTF3NHlNRXYQ+mBDwclbvZN/6tPJIjedywtTxI9NHpHd8+PDzG2jzoom3NAXvKESQDkr9KNVh45A0P0BTuz/03w== 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:PS1PR06MB1705; BCL:0; PCL:0; RULEID:; SRVR:PS1PR06MB1705; X-Forefront-PRVS: 09480768F8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(53416004)(81166006)(2950100001)(8676002)(66066001)(47776003)(36756003)(76176999)(50986999)(54356999)(42186005)(19580405001)(19580395003)(86362001)(110136002)(189998001)(92566002)(77096005)(83506001)(33646002)(5008740100001)(4326007)(46406003)(5004730100002)(229853001)(50466002)(586003)(2906002)(23726003)(3846002)(6116002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:PS1PR06MB1705; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 23:mLiUqz6r3HUHdXdjApElqZtVC+NFPKycSlVAia43qpWZivgEn40fyx7gd0k1XT6emTS7pgu1eWmXz5zHM/MGoLLMLrTo+4vXJaB3bidnAz6r9Kq0XhIATH4FLjhOWY4M7BqFNfWhkFmnoxgxEiuCllU+yl/Y8n7sMl6UH/EvUEAEI1jMsJr8HB+qh8Yk/ReY3cU5Wdi+8aTaOJu0B1aavBKS+AnMYv5ZpEvZEsQujnSX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myFAxtwOdz1Yqo4btM/lNZ24dLCDICNuShw6a8NilIzZjvryZUgliFqfmeNNUwLPm0blWCrW/78kxS3yR2buntbcBTxertzXsqnOvwl; 20:74rOY4t5bGUPaEMXudEGPyRMwqF7FBhBcoBlrW3hMhzTqcEY6PD35n0d4RKKUbIpvvQMl/4yZUYdcYAgS3+Th5OnBSguvmhncwEgxcffNipsoO7r/7VeDXTnShYbGwHvSlWZvp33pA5WHI1ZYbsvtF134JMLiKhKXjJ/7t52lN4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2016 09:56:29.1132 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR06MB1705 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 | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index ab97a07..45c8ccc 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -226,7 +226,6 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, struct device_node *cpu = NULL; struct device_node *plat = NULL; struct device_node *codec = NULL; - char *name; char prop[128]; char *prefix = ""; int ret, single_cpu; @@ -297,19 +296,10 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, if (!dai_link->platform_of_node) dai_link->platform_of_node = dai_link->cpu_of_node; - /* DAI link name is created from CPU/CODEC dai name */ - name = devm_kzalloc(dev, - strlen(dai_link->cpu_dai_name) + - strlen(dai_link->codec_dai_name) + 2, - GFP_KERNEL); - if (!name) { - ret = -ENOMEM; + ret = asoc_simple_card_parse_dailink_name(dev, dai_link); + if (ret < 0) goto dai_link_of_err; - } - sprintf(name, "%s-%s", dai_link->cpu_dai_name, - dai_link->codec_dai_name); - dai_link->name = dai_link->stream_name = name; dai_link->ops = &asoc_simple_card_ops; dai_link->init = asoc_simple_card_dai_init;