From patchwork Tue May 31 09:08:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9143919 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 D138B60777 for ; Tue, 31 May 2016 09:08:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4F4E27B89 for ; Tue, 31 May 2016 09:08:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9E3228185; Tue, 31 May 2016 09:08:53 +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 3FF1627B89 for ; Tue, 31 May 2016 09:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756118AbcEaJIw (ORCPT ); Tue, 31 May 2016 05:08:52 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:41583 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756917AbcEaJIv (ORCPT ); Tue, 31 May 2016 05:08:51 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 31 May 2016 18:08:49 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id C64AB533E0; Tue, 31 May 2016 18:08:49 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id C60FB1806F; Tue, 31 May 2016 18:08:49 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id C00121800A; Tue, 31 May 2016 18:08:49 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id UAG11902; Tue, 31 May 2016 18:08:49 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="212432298" Received: from mail-pu1apc01lp0022.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.22]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 31 May 2016 18:08:49 +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=T1gDwgf4I9hnyhOwyK/skOQQ3Tvj1pPqieKJVY/qQUE=; b=JuGwdRfMyr7f0ebrkdV5R7dZaoO/mkaHQhxcRe6l6rdfKqeqZtBOgb24JbEItG5PznSMYoAmxM9cAa9aYoG/FsFKpzXX73QZxCA0efv+l1Vzqk3izNPQdj6/SH9v6AUYMhY3zjvAeTzySvQ+KWvI4V+I4ntxks706HNTcWIOxCo= 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.506.9; Tue, 31 May 2016 09:08:46 +0000 Message-ID: <87h9der467.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 24/39 v2] ASoC: simple-card: use asoc_simple_card_clean_reference() 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:08:46 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0083.jpnprd01.prod.outlook.com (10.167.153.171) To PS1PR06MB1705.apcprd06.prod.outlook.com (10.167.53.15) X-MS-Office365-Filtering-Correlation-Id: a9c32a8c-d1c9-47bb-dcb9-08d389332c8b X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 2:xlZXP8GES1kOvDQrJCVl0346N/kKedcz7t95Fr+O6hYJJyv94Zw3fYsJ2ATud5aFWJ3oX6MQGtIUASQqlYGNI+N4V0Nm5HcZ7m2YVpH9TPOmfkRrsnJME7COvnIr/iBYLqRkRcIxh2cBMQg31gLyvEu9QXN2WKIJVCubq8wGuhXYBhJjP4X/UjC7Cz1H00dF; 3:8krOqQXjb4Ugb8TIFe/8HaXgnF10L0OCdjRy+g+m7Ssj9VdsGXXbXVbJqJDlfNeP2KO1xQeJbRPjmy3kcmSHew4F7ks2QKXcUGwuVenMsy5HpK2uH+0TUZPR3R1h16Y2 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:PS1PR06MB1705; X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1705; 25:dghWEFptaWLEC5Fkq3VvOAjprFW2DoeiePtkPrtMbeSNcMk0KuKcOzbay/vLUucJJpKxoAdCB0gnONG8TC7CR7p4LXRy25q9ZSmrsWEyH/xTpbOc7DsexeQ2RIpiXA10/Rzwt9CXc9e1gY0x+oIKLZ64G1M7zLkIpPjtjnVcFmmdxluUYw1VZeV5X2USV4r0u5VmMKPdqayJADGAJ6nDDKAdjlkHR+A2hHxkY9ygYAaSoQWUsSqdC+tPWBUNJ1lyTw80J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Voepuabz/Knarm6dHm61N0X5vzYAckKc0gpj9JMg7JfuVWaZ8vOgafC8xAFpErODEnw2PcHRBaf+zNSnZTGb1jiyZGss0i+Cg/mtfLyiJrtFwP75PoWimiZDJsxR65jWhck9dQZ9wTLqUsxewBVN14Bukfol9iT7Et5O3ss1SlY9WP58en2JpTDzxxTLAty9NwZEpLcgsYZ5kF07ZwTUsIdtQnKHJXvdqMLL7aTw5x0COLok3TBry94LhpN/qX3G9D3bvnEUfZqZ3ELAOTlE1cUfYrq6Fy2JYVIdkw0FCqZqH1aKSQ== 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:PS1PR06MB1705; BCL:0; PCL:0; RULEID:; SRVR:PS1PR06MB1705; X-Forefront-PRVS: 095972DF2F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(81166006)(46406003)(5008740100001)(19580395003)(4326007)(19580405001)(50466002)(36756003)(586003)(5004730100002)(6116002)(23726003)(50986999)(54356999)(76176999)(3846002)(77096005)(83506001)(110136002)(4001350100001)(2950100001)(189998001)(33646002)(86362001)(53416004)(2906002)(8676002)(42186005)(47776003)(66066001)(229853001)(92566002)(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: =?us-ascii?Q?1; PS1PR06MB1705; 23:p9vO+Zcm+YJTPDUf931MkewHlSXzO18A56wKZTe6o?= =?us-ascii?Q?Z+Jnmz9ODx1hdUDJFTgziexiFiCxWudiu3bWmYmYILFMLUS21O+ZbSiv4G3u?= =?us-ascii?Q?jS2gAJOE5a+qgnDbstBSgsWwIFPJd1Yann/aH1hPLYnW7W8uL5v6agfaHB4S?= =?us-ascii?Q?D3cpC7L74nxsp/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bg07gxK+GYrg9bVuzRtEtyfBFUIjzPYmsIy8vcEkEs2JXJrkz7qveceQhO733VrgQYTpdNkywZfgIGpmFr8EkHMpRVaImqZU90BALyuM+A==; 24:fJpveHNFyb/oIl2xWrlw/arFVXrxazNqiwn/am/po4nrmYHzViJBhPTga1QyS34pXTjSazYEPpR2Xp6nG3YT9FG57pwucabNPI2bbilV4IA=; 7:8rhhB3OBRZ1VTEl3b9oUtkMpGlqPsHMw3n82kz6++5WeBD1BXvv9wao7wf22QCVxPT7gEN2Y+BDzx41xBHVuBIzdqQrR3AkZ3AX4TS5H2EfseljLY3dhq2Vyphaz2BHbZrQWAc6Eck+YsBpMKUnJ7983cOnsOKB9FwD9GWjoyAtV4lqEFaKU7ElmWNJyRK6C; 20:6FCVkMvFpISv2bNvxW+ZpK3EL8Hzrf3OKauC9BojtvrS4K+gNO0iYafNMs97wyI7GZ3fhndMsVLYnZu5FO2Z5wwt0eX4SHFL8J9yTAdbRj/89GcNC4q8nULX2d87svTv9KSy4ABohq68uWBAimc92qVddQcmZ/F8QYrkWrJ7Dl0= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2016 09:08:46.9322 (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 | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index c9178af..02fab53 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -371,21 +371,6 @@ static int asoc_simple_card_parse_of(struct device_node *node, return 0; } -/* Decrease the reference count of the device nodes */ -static int asoc_simple_card_unref(struct snd_soc_card *card) -{ - struct snd_soc_dai_link *dai_link; - int num_links; - - for (num_links = 0, dai_link = card->dai_link; - num_links < card->num_links; - num_links++, dai_link++) { - of_node_put(dai_link->cpu_of_node); - of_node_put(dai_link->codec_of_node); - } - return 0; -} - static int asoc_simple_card_probe(struct platform_device *pdev) { struct simple_card_data *priv; @@ -471,7 +456,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev) return ret; err: - asoc_simple_card_unref(&priv->snd_card); + asoc_simple_card_clean_reference(&priv->snd_card); return ret; } @@ -483,7 +468,7 @@ static int asoc_simple_card_remove(struct platform_device *pdev) asoc_simple_card_remove_jack(&priv->hp_jack); asoc_simple_card_remove_jack(&priv->mic_jack); - return asoc_simple_card_unref(card); + return asoc_simple_card_clean_reference(card); } static const struct of_device_id asoc_simple_of_match[] = {