From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FA5FC432C0 for ; Fri, 22 Nov 2019 05:44:50 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 98C8420708 for ; Fri, 22 Nov 2019 05:44:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="rb4eaTFs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98C8420708 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E9D8A17F8; Fri, 22 Nov 2019 06:43:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E9D8A17F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1574401488; bh=Z2D7oVBrv2mBlhGwR/MHyD9Eo9enfvczmVCJKoqlY94=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rb4eaTFsLbN0JCHfdjXtb9P3PYGzlMceN5fBUsKklIVr9+luVpqiJAV8nPE44Wg6O mqZawiJTUIPWqaQSezBHzoCTR88JzLOHxxOoh1SZxMyD2/3y/vIt7CRADSKgYRepPG xZ2QIwQgGpwuuXUAh6TQdaP505w2tQdMJpPNaDsc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4400CF80216; Fri, 22 Nov 2019 06:41:16 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9B956F80217; Fri, 22 Nov 2019 06:41:14 +0100 (CET) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id D1B0FF8015A for ; Fri, 22 Nov 2019 06:41:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D1B0FF8015A Date: 22 Nov 2019 14:41:07 +0900 X-IronPort-AV: E=Sophos;i="5.69,228,1571670000"; d="scan'208";a="32363127" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 Nov 2019 14:41:07 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 17A68400D0E9; Fri, 22 Nov 2019 14:41:07 +0900 (JST) Message-ID: <87ftig8o3w.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.5 Mule/6.0 To: Mark Brown In-Reply-To: <87r2208o9g.wl-kuninori.morimoto.gx@renesas.com> References: <87r2208o9g.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 08/14] ASoC: soc-core: rename snd_soc_remove_dai_link() to snd_soc_remove_pcm_runtime() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto Now soc-core and soc-topology is using snd_soc_remove_dai_link(). It sounds like dai_link function. It removes pcm_runtime (= rtd) and disconnect it from card. The purpose is removing pcm_runtime, not dai_link. This patch renames function name. Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 4 ++-- sound/soc/soc-core.c | 29 +++++++++++------------------ sound/soc/soc-topology.c | 4 +++- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index b223b2d..3923178 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1325,8 +1325,8 @@ void snd_soc_of_put_dai_link_codecs(struct snd_soc_dai_link *dai_link); int snd_soc_add_pcm_runtime(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); -void snd_soc_remove_dai_link(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_link); +void snd_soc_remove_pcm_runtime(struct snd_soc_card *card, + struct snd_soc_pcm_runtime *rtd); struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component, struct snd_soc_dai_driver *dai_drv, diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index af2eed7..1ad1116 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -998,33 +998,26 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card, } /** - * snd_soc_remove_dai_link - Remove a DAI link from the list - * @card: The ASoC card that owns the link - * @dai_link: The DAI link to remove + * snd_soc_remove_pcm_runtime - Remove a pcm_runtime from card + * @card: The ASoC card to which the pcm_runtime has + * @rtd: The pcm_runtime to remove * - * This function removes a DAI link from the ASoC card's link list. - * - * For DAI links previously added by topology, topology should - * remove them by using the dobj embedded in the link. + * This function removes a pcm_runtime from the ASoC card. */ -void snd_soc_remove_dai_link(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_link) +void snd_soc_remove_pcm_runtime(struct snd_soc_card *card, + struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_pcm_runtime *rtd; - lockdep_assert_held(&client_mutex); /* * Notify the machine driver for extra destruction */ if (card->remove_dai_link) - card->remove_dai_link(card, dai_link); + card->remove_dai_link(card, rtd->dai_link); - rtd = snd_soc_get_pcm_runtime(card, dai_link); - if (rtd) - soc_free_pcm_runtime(rtd); + soc_free_pcm_runtime(rtd); } -EXPORT_SYMBOL_GPL(snd_soc_remove_dai_link); +EXPORT_SYMBOL_GPL(snd_soc_remove_pcm_runtime); /** * snd_soc_add_pcm_runtime - Add a pcm_runtime dynamically via dai_link @@ -1104,7 +1097,7 @@ int snd_soc_add_pcm_runtime(struct snd_soc_card *card, return 0; _err_defer: - soc_free_pcm_runtime(rtd); + snd_soc_remove_pcm_runtime(card, rtd); return -EPROBE_DEFER; } EXPORT_SYMBOL_GPL(snd_soc_add_pcm_runtime); @@ -1886,7 +1879,7 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card, soc_remove_link_components(card); for_each_card_rtds_safe(card, rtd, n) - snd_soc_remove_dai_link(card, rtd->dai_link); + snd_soc_remove_pcm_runtime(card, rtd); /* remove auxiliary devices */ soc_remove_aux_devices(card); diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index de42788..e9b660f 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -553,7 +553,9 @@ static void remove_link(struct snd_soc_component *comp, kfree(link->cpus->dai_name); list_del(&dobj->list); - snd_soc_remove_dai_link(comp->card, link); + + snd_soc_remove_pcm_runtime(comp->card, + snd_soc_get_pcm_runtime(comp->card, link)); kfree(link); } -- 2.7.4 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel