From patchwork Fri May 20 10:06:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9129135 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 93ECB60467 for ; Fri, 20 May 2016 10:06:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8687D1FFC9 for ; Fri, 20 May 2016 10:06:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B38527BF1; Fri, 20 May 2016 10:06:31 +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 123C527A84 for ; Fri, 20 May 2016 10:06:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753562AbcETKGa (ORCPT ); Fri, 20 May 2016 06:06:30 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:9858 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752930AbcETKGa (ORCPT ); Fri, 20 May 2016 06:06:30 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 20 May 2016 19:06:28 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 82B4A4ED08; Fri, 20 May 2016 19:06:28 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 7F8872806E; Fri, 20 May 2016 19:06:21 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 80E7D280C6; Fri, 20 May 2016 19:06:21 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id VBU26304; Fri, 20 May 2016 19:06:21 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211717331" 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; 20 May 2016 19: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=Dd4nCCquAM+qjinVU1JzqjavLpx1SdZDeQCljABWqBQ=; b=Mpr+rD7YENb5qUsP6Fz087C4PDJf2ucq7B3zp6R+Qf/9x4qOP1oc43ruzWZjiid28lsKLPRzn4mnCjBbxL2r8HwdexXgdHzebr/dwVGMOy6KvVBeAC1Vwhm5MGlrsSu7TO0AxzWp7EuIl/pOAqC8GhWseaJbV6ebwN98OlwKRwU= 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 KL1PR06MB1703.apcprd06.prod.outlook.com (10.167.63.17) with Microsoft SMTP Server (TLS) id 15.1.497.12; Fri, 20 May 2016 10:06:16 +0000 Message-ID: <87poshoxqx.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 46/49] ASoC: rsrc-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: <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 10:06:16 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR06CA0018.apcprd06.prod.outlook.com (10.164.91.28) To KL1PR06MB1703.apcprd06.prod.outlook.com (10.167.63.17) X-MS-Office365-Filtering-Correlation-Id: 89370c2f-153f-4edb-3d8f-08d38096621f X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1703; 2:zm7qBPPO5nN+5XLnN+Isdb7Tt8DEAk5BO8D1c/jlD28zn6YJub15wZAO3+nwKvD/dNLPcbMb4+8BKF10jOY/dIzsAhBJaD85kbxeNnT71hU9+UgvB6G0YlJ/6jACJy+Nyzf3D1Cdj4FwmkMinDtHofYsArZDWLwF4HGBbH2otK0aAyq+UPDilI5WIlPA7K1Y; 3:Pt8tfs4TUTNSDjBZxy6BtIhiP2PA93pHyvSFwm3DVvuBsAOBE2rEg0+9xz+Lkh/eic1L0SfFfn5grJBiTZ4yfCVp7Eqx7rWDPhZxSsVNZN6oj5cVusII5D4uPeo/zhFU; 25:3GxIi0sP3gNYnnoXzz5OzyCpAP5ugc4w05UO0ywTrbIhtE+z+gsHzrEJxn+qIBAgtBT6ZPtZL8lKN5QYDw2qf1JNp1lW90cCAfPL/66GT9ZJvVUzxHsgx0DC9fduUoCMgGORzLhwdCh/l66h9Md7uoXvKbT394TljZtmtvq1HuJjScIMCjiZy+pKHigZb162JIz65VjdAZ/PlFDdVnsug7bbWGVbSRKmP8uUsiUXd5sN1J+ayEdVJZfUNDMpK1Dre2WBgh2YJzLw0ilc2tIITFyeDKStkS9dZ5eBs2UNC/08DXSD32maOA2a3KN1vZ95C5QPTPoPGYzXIUcPXWK+QjOhQUjeNW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TKwon1RkE5g/jg7aq/fnbTtg== 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:KL1PR06MB1703; BCL:0; PCL:0; RULEID:; SRVR:KL1PR06MB1703; X-Forefront-PRVS: 09480768F8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(4326007)(2906002)(46406003)(5004730100002)(3846002)(23726003)(2950100001)(33646002)(229853001)(110136002)(36756003)(42186005)(53416004)(86362001)(19580395003)(19580405001)(47776003)(83506001)(189998001)(66066001)(76176999)(54356999)(50986999)(8676002)(81166006)(77096005)(5008740100001)(92566002)(586003)(50466002)(6116002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR06MB1703; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1703; 23:bBqBGPyDITrfErRkrISVuBGk7IyH4lMzjooxAxK4iimrt2p0NivbEWp1oQi/5YxZxCSWoJS0+OMmqoi1t2TZJDMprxXOYjxancUcAJl4PI56BQxT61AFHM0IwWWxgiWr/xpSAN+GVYdiFCZe3K7G8ae4FBvlB4f2GhMB5pKeWxDHFVHWi0q8fpOetyv2KgNpIZok+pws23s2oF5OLaW4FU+6GjOovykgLYchc7omOc+n6pxfZfN2H0TAtOSEBXuGBBwQjrxYZCPNp2t1ccBnbPOkoGzKQ0HqRWIZkpgBhTjIkr2HjO+ntHE9jdE76Ktr7ypquf7RHDDHbSgs5NRfhgukC5XIKHtc7EyhjSy4YkF247s/6l15fHvNMTq9PMxypqaIKVeaSMf+gwmQZ5pPgGmOIL0Nqwm1OgnvV6Aya5w1X521e5WLK3S4h3GGC28otijWcjlKVA/0Tw5NxhVni+TVRm/S3xyrVm3fMtJTk1cAlEFtVkmhmI0hBu1qxIIGIA1AoPjuM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DiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2016 10:06:16.2942 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB1703 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/sh/rcar/rsrc-card.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index 814cdbe..6b77152 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -304,21 +304,6 @@ static int rsrc_card_parse_of(struct device_node *node, return 0; } -/* Decrease the reference count of the device nodes */ -static int rsrc_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 rsrc_card_probe(struct platform_device *pdev) { struct rsrc_card_priv *priv; @@ -344,7 +329,7 @@ static int rsrc_card_probe(struct platform_device *pdev) if (ret >= 0) return ret; err: - rsrc_card_unref(&priv->snd_card); + asoc_simple_card_clean_reference(&priv->snd_card); return ret; } @@ -353,7 +338,7 @@ static int rsrc_card_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); - return rsrc_card_unref(card); + return asoc_simple_card_clean_reference(card); } static struct platform_driver rsrc_card = {