From patchwork Tue Mar 24 01:44:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6076021 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3BDD19F2A9 for ; Tue, 24 Mar 2015 01:45:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3477C2037F for ; Tue, 24 Mar 2015 01:45:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D96F820377 for ; Tue, 24 Mar 2015 01:45:12 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C74AC261A74; Tue, 24 Mar 2015 02:45:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 7976C261566; Tue, 24 Mar 2015 02:45:03 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 414FD261691; Tue, 24 Mar 2015 02:45:02 +0100 (CET) Received: from relmlie3.idc.renesas.com (relmlor4.renesas.com [210.160.252.174]) by alsa0.perex.cz (Postfix) with ESMTP id 87DF626155E for ; Tue, 24 Mar 2015 02:44:53 +0100 (CET) Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie3.idc.renesas.com with ESMTP; 24 Mar 2015 10:44:50 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id EF98F45CAC; Tue, 24 Mar 2015 10:44:50 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id DA8992806E; Tue, 24 Mar 2015 10:44:50 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id C60522806D; Tue, 24 Mar 2015 10:44:50 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id LAU22959; Tue, 24 Mar 2015 10:44:50 +0900 X-IronPort-AV: E=Sophos;i="5.11,455,1422889200"; d="scan'208";a="182600957" Received: from mail-hk1lp0125.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.125]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 24 Mar 2015 10:44:50 +0900 Received: from morimoto-PC.renesas.com (211.11.155.132) by HKNPR06MB308.apcprd06.prod.outlook.com (10.141.37.28) with Microsoft SMTP Server (TLS) id 15.1.118.21; Tue, 24 Mar 2015 01:44:49 +0000 Message-ID: <87a8z341ao.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Tue, 24 Mar 2015 01:44:49 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: KAWPR01CA0018.jpnprd01.prod.outlook.com (25.161.24.28) To HKNPR06MB308.apcprd06.prod.outlook.com (10.141.37.28) Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKNPR06MB308; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(53416004)(92566002)(46102003)(47776003)(229853001)(19580395003)(87976001)(77096005)(110136001)(50466002)(19580405001)(23726002)(83506001)(50986999)(33646002)(54356999)(46406003)(40100003)(86362001)(62966003)(36756003)(66066001)(77156002)(122386002)(42186005); DIR:OUT; SFP:1102; SCL:1; SRVR:HKNPR06MB308; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002010); SRVR:HKNPR06MB308; BCL:0; PCL:0; RULEID:; SRVR:HKNPR06MB308; X-Forefront-PRVS: 0525BB0ADF X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2015 01:44:49.0590 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKNPR06MB308 Cc: Linux-ALSA , Simon , Liam Girdwood Subject: [alsa-devel] [PATCH] ASoC: soc-core: call soc_cleanup_card_debugfs() from snd_soc_unregister_card() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Card debugfs is created in snd_soc_register_card(), but soc_cleanup_card_debugfs() is called from soc_cleanup_card_resources(). Cleanup function should be called from paired unregister function. Signed-off-by: Kuninori Morimoto --- sound/soc/soc-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4c26074..211783f 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1751,8 +1751,6 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card) /* remove and free each DAI */ soc_remove_dai_links(card); - soc_cleanup_card_debugfs(card); - /* remove the card */ if (card->remove) card->remove(card); @@ -2447,6 +2445,7 @@ int snd_soc_unregister_card(struct snd_soc_card *card) card->instantiated = false; snd_soc_dapm_shutdown(card); soc_cleanup_card_resources(card); + soc_cleanup_card_debugfs(card); dev_dbg(card->dev, "ASoC: Unregistered card '%s'\n", card->name); }