From patchwork Fri May 20 09:58:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9129097 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 03ADD6048B for ; Fri, 20 May 2016 09:58:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA26A2793B for ; Fri, 20 May 2016 09:58:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DED7727A84; Fri, 20 May 2016 09:58:47 +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 5A83E2793B for ; Fri, 20 May 2016 09:58:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753719AbcETJ6q (ORCPT ); Fri, 20 May 2016 05:58:46 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:63773 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933222AbcETJ6p (ORCPT ); Fri, 20 May 2016 05:58:45 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 20 May 2016 18:58:44 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 20E1352FFB; Fri, 20 May 2016 18:58:44 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 012BB8002E; Fri, 20 May 2016 18:58:43 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id EE5BB8002D; Fri, 20 May 2016 18:58:43 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id UBG13945; Fri, 20 May 2016 18:58:43 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211715397" Received: from mail-pu1apc01lp0020.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.20]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 20 May 2016 18:58:43 +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=uCbL5VrxmfVwMtsd5ZeDBfBg2cS7aS/NnbGIPxIiJd0=; b=dGOPxu7mx3ggwvkKyrvJCp/O/T7Y85yRq6wn8YfS1Ff3YS8DhfrrRZYiSnUNOD7Zyu1VI+ae/6gT7K6t9ENjGE+1QPnoPlzHo6iwO7Xinnj5/Gup1Utuce/nuqE9rgAg3Ypw/oJBwDMvmdrMdoxkAZeiL1bwlHZPhrHRK2306D4= 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 SG2PR06MB1710.apcprd06.prod.outlook.com (10.167.82.140) with Microsoft SMTP Server (TLS) id 15.1.497.12; Fri, 20 May 2016 09:58:41 +0000 Message-ID: <87a8jlqco1.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 32/49] 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: <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:58:41 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0028.jpnprd01.prod.outlook.com (10.165.48.138) To SG2PR06MB1710.apcprd06.prod.outlook.com (10.167.82.140) X-MS-Office365-Filtering-Correlation-Id: c4c5a384-388a-4bd9-5319-08d3809552f9 X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1710; 2:Mtzi6sIi3dAow3H4CHbdO0IW7GPpVELOlKqRwkLjtsixPLjjzjUZuJh2TDhb4AoNiStneGfnageUSCyFg3+Z5lOxcDbo1QM55HM2/tSyKZNIoFWywoJ0nPSd3VvZPGrK+PKYEPtj9ybLeOm8VI3+hLLy4SGbOkrvapk1Mm2Ei5suxEsskEu7y087eAOqQ0ZV; 3:m/GGFW1xODgrAXWJ1vXykOGGppD1mfGCnoKKi7l/cBMuIcVPKwDX+5aZDVTyGGwe7fBz8/kxVCWqQG+rTBZXmFRbdiF3Kz1X60+UES5z6UL2+b66S8w/STviQ/K9v7tW X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB1710; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1710; 25:NvxxwUQTmapNg3S0E+Vf+vvPAQgI3WBIkvx6rECioN8Qk/a7WX49KhFvjS4xVmn8CytQpHZ8V5g5QU7qzz6r/EKQdlNZeF7bvT2pc8Z2vCUWOaFPW7aMjMhJPLB0y7VGk3HZCdkTNF4hhnv15s5vkYfkqyp3gZk/vSPu5YKoHHzSjkjxnIu/RWVeFwIH3rroCgTV9JYa3kLFmB6Jx+62VkuRB7w+QUwvUuvmzxyxmP+a8vZ/aoPO00J5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qOs+sbF4W7NcAuJXbzs/F3AJs7AwXhyuXDaR1Pa/BqOcYfA3PmeBDTYBXFv2pKCQPRnz1mSuKgO/aIhlFF4fc6JpYUdKkIBK3KzwcYbJlR9E7Kc84LGbyeSL/mb/NOu3VsT8zn4uYh2YUQ3wIEsJsV90Q/8buRLu0v3oGcdAS3qgVA2gN8Bl6v5pvenkZZ/UEEzfT5Ivmjva9grPOIF7OSOLYtGPC+NsOLVWScmDPFvNgDS4ZrlIxpZQIT5cGDngXz+hUbJcUtgv8G4PcU6/vl9tdNJCCE8mWaxl0jZVfy0OgKt8q5vi76rwWF6KCHZsOjag8Mr9gK2Z11qKC6ZlwQ== 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:SG2PR06MB1710; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB1710; X-Forefront-PRVS: 09480768F8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(81166006)(66066001)(47776003)(19580395003)(92566002)(42186005)(2906002)(586003)(5004730100002)(3846002)(575784001)(86362001)(6116002)(19580405001)(4326007)(54356999)(76176999)(50986999)(53416004)(8676002)(46406003)(189998001)(33646002)(110136002)(77096005)(2950100001)(36756003)(50466002)(229853001)(23726003)(83506001)(5008740100001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB1710; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1710; 23:y15+DT0UA7aCAzXAmCnh9CL5m539gmt9tGHH8LIAJh5VWnR+pNBUE+0oTxB2AW8FFcq7NFsvCIkuNSC4hCsRnrwukdgOpap6rI/sQbZo+lE10DFMYKgPdGb3csnCoNk7pRrw1mjR9qLfHHFhQyKf6OT66XMbHYa0c4/EZaI13ND1raaUYJy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; 7:iAqUKiKf4+fNXCCIrGWE/8ENhZNHZ34rN4GDIEqJBpXdNhlsj/jzAEQmDhzIkECsG1tH2XlG/LMfRPMZqx8HlzCPrn+zDkkV/MNGrpqUO+U9dVhuU5WfwJdSb7zNnoAaX6KHi7rjPliMlMkHP4Orfnr2CqqL8FqHhqjHK+rzvBAaJBuSCm8FFzTItLw+a1Fp; 20:KvMGuk9rbADd7CVTP4Y1IC9OeEQDl6s9QkPdsQXhF5YgTScfzC/dGz5K3F8XkZu2B/zc+ecuWQ4PjbHlwBOufpUClS29lKTuwaHLjwJ5iLxlGWSF6K+v/rau0gPSxQnNXitnaIwDUdMq17fPasEbiEVX78QCKXpmWHYioRUJ6yk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2016 09:58:41.4456 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1710 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 2ec59ae..0b5ff0e 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -295,21 +295,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; @@ -395,7 +380,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; } @@ -407,7 +392,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[] = {