Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-sound@vger.kernel.org
Subject: [PATCH 13/14] ASoC: soc-component: move __snd_soc_of_put_component() to soc-component.c
Date: Tue, 29 Sep 2026 05:30:24 +0000	[thread overview]
Message-ID: <877bk4eia8.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87pkxweibu.wl-kuninori.morimoto.gx@renesas.com>

struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.

Move __snd_soc_of_put_component() to soc-component.c

It renames function name
-	__snd_soc_of_put_component()
+	snd_soc_component_of_put()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-component.c |  8 ++++++++
 sound/soc/soc-core.c      | 12 ++----------
 sound/soc/soc-internal.h  |  1 +
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 9a288f7107c3e..cdbe0eb0e17ee 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -1573,3 +1573,11 @@ struct snd_soc_component *snd_soc_component_lookup_by_name(const char *component
 	return NULL;
 }
 EXPORT_SYMBOL_GPL(snd_soc_component_lookup_by_name);
+
+void snd_soc_component_of_put(struct snd_soc_dai_link_component *component)
+{
+	if (component->of_node) {
+		of_node_put(component->of_node);
+		component->of_node = NULL;
+	}
+}
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 8bbd100fb0fa7..ae79442c9c5a1 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3129,14 +3129,6 @@ struct snd_soc_dai *snd_soc_get_dai_via_args(const struct of_phandle_args *dai_a
 }
 EXPORT_SYMBOL_GPL(snd_soc_get_dai_via_args);
 
-static void __snd_soc_of_put_component(struct snd_soc_dai_link_component *component)
-{
-	if (component->of_node) {
-		of_node_put(component->of_node);
-		component->of_node = NULL;
-	}
-}
-
 static int __snd_soc_of_get_dai_link_component_alloc(
 	struct device *dev, struct device_node *of_node,
 	struct snd_soc_dai_link_component **ret_component,
@@ -3176,7 +3168,7 @@ void snd_soc_of_put_dai_link_codecs(struct snd_soc_dai_link *dai_link)
 	int index;
 
 	for_each_link_codecs(dai_link, index, component)
-		__snd_soc_of_put_component(component);
+		snd_soc_component_of_put(component);
 }
 EXPORT_SYMBOL_GPL(snd_soc_of_put_dai_link_codecs);
 
@@ -3233,7 +3225,7 @@ void snd_soc_of_put_dai_link_cpus(struct snd_soc_dai_link *dai_link)
 	int index;
 
 	for_each_link_cpus(dai_link, index, component)
-		__snd_soc_of_put_component(component);
+		snd_soc_component_of_put(component);
 }
 EXPORT_SYMBOL_GPL(snd_soc_of_put_dai_link_cpus);
 
diff --git a/sound/soc/soc-internal.h b/sound/soc/soc-internal.h
index 3ae24274504cc..a790be1c4f782 100644
--- a/sound/soc/soc-internal.h
+++ b/sound/soc/soc-internal.h
@@ -45,6 +45,7 @@ bool snd_soc_component_matches_dlc(struct snd_soc_component *component,
 void snd_soc_component_remove(struct snd_soc_component *component, int probed);
 int snd_soc_component_probe(struct snd_soc_card *card, struct snd_soc_component *component);
 struct list_head *snd_soc_component_get_list_head(void);
+void snd_soc_component_of_put(struct snd_soc_dai_link_component *component);
 
 #define for_each_component(component)					\
 	list_for_each_entry(component, snd_soc_component_get_list_head(), list)
-- 
2.53.0


  parent reply	other threads:[~2026-09-29  5:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  5:29 [PATCH 00/14] ASoC: soc-component: move snd_soc_component_xxx() to soc-component.c Kuninori Morimoto
2026-09-29  5:29 ` [PATCH 01/14] ASoC: soc-component: tidyup be_hw_params_fixup() define position Kuninori Morimoto
2026-09-29  5:29 ` [PATCH 02/14] ASoC: soc-component: replace bool member to bit field Kuninori Morimoto
2026-09-29  5:29 ` [PATCH 03/14] ASoC: soc-component: move snd_soc_add_component_controls() Kuninori Morimoto
2026-09-29  5:29 ` [PATCH 04/14] ASoC: soc-component: move snd_soc_component_fixup_controls() Kuninori Morimoto
2026-09-29  5:29 ` [PATCH 05/14] ASoC: soc-component: move soc_component_to_node() to soc-component.c Kuninori Morimoto
2026-09-29  5:29 ` [PATCH 06/14] ASoC: soc-component: move snd_soc_is_matching_component() " Kuninori Morimoto
2026-09-29  5:30 ` [PATCH 07/14] ASoC: soc-component: move soc_{probe/remove}_component() " Kuninori Morimoto
2026-09-29  8:24   ` Alvin Šipraga
2026-09-29 23:36     ` Kuninori Morimoto
2026-09-29  5:30 ` [PATCH 08/14] ASoC: soc-component: move snd_soc_component_to_dapm() " Kuninori Morimoto
2026-09-29  5:30 ` [PATCH 09/14] ASoC: soc-component: move snd_soc_component_cache_sync() " Kuninori Morimoto
2026-09-29  5:30 ` [PATCH 10/14] ASoC: soc-component: move snd_soc_component_active() " Kuninori Morimoto
2026-09-29  5:30 ` [PATCH 11/14] ASoC: soc-component: move component_list " Kuninori Morimoto
2026-09-29  5:30 ` [PATCH 12/14] ASoC: soc-component: move snd_soc_lookup_component() " Kuninori Morimoto
2026-09-29  5:30 ` Kuninori Morimoto [this message]
2026-09-29  5:30 ` [PATCH 14/14] ASoC: soc-component: rename snd_soc_component_async_complete() Kuninori Morimoto
2026-09-29  8:25 ` [PATCH 00/14] ASoC: soc-component: move snd_soc_component_xxx() to soc-component.c Alvin Šipraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877bk4eia8.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=broonie@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox