]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: soc-component: remove pcm_construct()/pcm_destruct()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 16 Mar 2026 02:27:57 +0000 (02:27 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 16 Mar 2026 13:38:08 +0000 (13:38 +0000)
All driver have switched to use pcm_new()/pcm_free(), let's remove
pcm_construct()/pcm_destruct().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/875x6wjyoa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-component.h
sound/soc/generic/audio-graph-card.c
sound/soc/soc-component.c

index 0435ba376369adaa0d0136b13b77c0c26ce3f355..60f73c4b0bbbb6975c41a2784e3fc5217089d52a 100644 (file)
@@ -86,10 +86,6 @@ struct snd_soc_component_driver {
                     unsigned int reg, unsigned int val);
 
        /* pcm creation and destruction */
-       int (*pcm_construct)(struct snd_soc_component *component,
-                            struct snd_soc_pcm_runtime *rtd);
-       void (*pcm_destruct)(struct snd_soc_component *component,
-                            struct snd_pcm *pcm);
        int (*pcm_new)(struct snd_soc_component *component,
                       struct snd_soc_pcm_runtime *rtd);
        void (*pcm_free)(struct snd_soc_component *component,
index 74e8f2ab7ffc9d253efb3cca939596a1b768af29..18ce4ee063509d9abf8861fbd1abea8817cb4979 100644 (file)
@@ -76,8 +76,7 @@ static bool soc_component_is_pcm(struct snd_soc_dai_link_component *dlc)
 {
        struct snd_soc_dai *dai = snd_soc_find_dai_with_mutex(dlc);
 
-       if (dai && (dai->component->driver->pcm_construct ||
-                   dai->component->driver->pcm_new ||
+       if (dai && (dai->component->driver->pcm_new ||
                    (dai->driver->ops && dai->driver->ops->pcm_new)))
                return true;
 
index 77ad3338397445be9972943578a729d6f200bb74..0f5e120d32b71e58302278091df237d204a37a50 100644 (file)
@@ -1037,11 +1037,6 @@ int snd_soc_pcm_component_new(struct snd_soc_pcm_runtime *rtd)
        int i;
 
        for_each_rtd_components(rtd, i, component) {
-               if (component->driver->pcm_construct) {
-                       ret = component->driver->pcm_construct(component, rtd);
-                       if (ret < 0)
-                               return soc_component_ret(component, ret);
-               }
                if (component->driver->pcm_new) {
                        ret = component->driver->pcm_new(component, rtd);
                        if (ret < 0)
@@ -1060,12 +1055,9 @@ void snd_soc_pcm_component_free(struct snd_soc_pcm_runtime *rtd)
        if (!rtd->pcm)
                return;
 
-       for_each_rtd_components(rtd, i, component) {
-               if (component->driver->pcm_destruct)
-                       component->driver->pcm_destruct(component, rtd->pcm);
+       for_each_rtd_components(rtd, i, component)
                if (component->driver->pcm_free)
                        component->driver->pcm_free(component, rtd->pcm);
-       }
 }
 
 int snd_soc_pcm_component_prepare(struct snd_pcm_substream *substream)