From 8fec6e55859e31b354207a46c16de3e12116d32f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 2 Jun 2026 02:55:31 +0000 Subject: ASoC: soc-component: remove CONFIG_DEBUG_FS for debugfs_prefix Both (A) and (B) have debugfs_prefix, but (B) is using CONFIG_DEBUG_FS (C) (A) struct snd_soc_component { ... const char *debugfs_prefix; }; (B) struct snd_soc_component_driver { ... (C) ifdef CONFIG_DEBUG_FS const char *debugfs_prefix; endif }; Remove (C) which makes code cleanup difficult. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87jyshk5wc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- include/sound/soc-component.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 7e158d27ae8d..337b7ef4156c 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -199,9 +199,7 @@ struct snd_soc_component_driver { bool use_dai_pcm_id; /* use DAI link PCM ID as PCM device number */ int be_pcm_base; /* base device ID for all BE PCMs */ -#ifdef CONFIG_DEBUG_FS const char *debugfs_prefix; -#endif }; struct snd_soc_component { -- cgit v1.2.3 From cd849a5fcac849a2c9d9391a2676bf3d0b4443dd Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 2 Jun 2026 02:56:00 +0000 Subject: ASoC: soc-component: remove .debugfs_prefix from Component All drivers are now setting .debugfs_prefix via Component driver. Remove it from Component. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87cxy9k5vj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- include/sound/soc-component.h | 1 - sound/soc/soc-core.c | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 337b7ef4156c..11bc9527653f 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -248,7 +248,6 @@ struct snd_soc_component { void *mark_pm; struct dentry *debugfs_root; - const char *debugfs_prefix; }; #define for_each_component_dais(component, dai)\ diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c0599031a3e4..e8986c039aa5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -136,11 +136,11 @@ static void soc_init_component_debugfs(struct snd_soc_component *component) if (!component->card->debugfs_card_root) return; - if (component->debugfs_prefix) { + if (component->driver->debugfs_prefix) { char *name; name = kasprintf(GFP_KERNEL, "%s:%s", - component->debugfs_prefix, component->name); + component->driver->debugfs_prefix, component->name); if (name) { component->debugfs_root = debugfs_create_dir(name, component->card->debugfs_card_root); @@ -2842,11 +2842,6 @@ int snd_soc_component_initialize(struct snd_soc_component *component, component->dev = dev; component->driver = driver; -#ifdef CONFIG_DEBUG_FS - if (!component->debugfs_prefix) - component->debugfs_prefix = driver->debugfs_prefix; -#endif - return 0; } EXPORT_SYMBOL_GPL(snd_soc_component_initialize); -- cgit v1.2.3