]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: remove unneeded .pcm_new/free
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 8 May 2018 03:19:49 +0000 (03:19 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 9 May 2018 09:39:01 +0000 (18:39 +0900)
commit ef050bece1b55 ("ASoC: Remove platform code now everything is
componentised") removed platform code, but it didn't remove
.pcm_new/free which existed only for platform.
This patch remove these

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-core.c
sound/soc/soc-pcm.c

index 309bb70bcb1e4b28c367a50501f8f2129d4fdb0c..131185563532359018b12302062102f89b00697c 100644 (file)
@@ -886,8 +886,6 @@ struct snd_soc_component {
        void (*remove)(struct snd_soc_component *);
        int (*suspend)(struct snd_soc_component *);
        int (*resume)(struct snd_soc_component *);
-       int (*pcm_new)(struct snd_soc_component *, struct snd_soc_pcm_runtime *);
-       void (*pcm_free)(struct snd_soc_component *, struct snd_pcm *);
 
        int (*set_sysclk)(struct snd_soc_component *component,
                          int clk_id, int source, unsigned int freq, int dir);
index e5af15aa1c28c937c5373f389e5bd015ef4d662d..3b78868969d58ae2b407bb669d8aa02300bcd6f8 100644 (file)
@@ -2943,22 +2943,6 @@ static int snd_soc_component_stream_event(struct snd_soc_dapm_context *dapm,
        return component->driver->stream_event(component, event);
 }
 
-static int snd_soc_component_drv_pcm_new(struct snd_soc_component *component,
-                                       struct snd_soc_pcm_runtime *rtd)
-{
-       if (component->driver->pcm_new)
-               return component->driver->pcm_new(rtd);
-
-       return 0;
-}
-
-static void snd_soc_component_drv_pcm_free(struct snd_soc_component *component,
-                                         struct snd_pcm *pcm)
-{
-       if (component->driver->pcm_free)
-               component->driver->pcm_free(pcm);
-}
-
 static int snd_soc_component_set_bias_level(struct snd_soc_dapm_context *dapm,
                                        enum snd_soc_bias_level level)
 {
@@ -2987,8 +2971,6 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
        component->set_sysclk = component->driver->set_sysclk;
        component->set_pll = component->driver->set_pll;
        component->set_jack = component->driver->set_jack;
-       component->pcm_new = snd_soc_component_drv_pcm_new;
-       component->pcm_free = snd_soc_component_drv_pcm_free;
 
        dapm = snd_soc_component_get_dapm(component);
        dapm->dev = dev;
index da5a2dcb6520f1f2b78c20820a2b4eb9a25bc753..3f6375499102068a5549121a902da3f109f531e2 100644 (file)
@@ -2745,8 +2745,8 @@ static void soc_pcm_private_free(struct snd_pcm *pcm)
        for_each_rtdcom(rtd, rtdcom) {
                component = rtdcom->component;
 
-               if (component->pcm_free)
-                       component->pcm_free(component, pcm);
+               if (component->driver->pcm_free)
+                       component->driver->pcm_free(pcm);
        }
 }
 
@@ -3012,10 +3012,10 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
        for_each_rtdcom(rtd, rtdcom) {
                component = rtdcom->component;
 
-               if (!component->pcm_new)
+               if (!component->driver->pcm_new)
                        continue;
 
-               ret = component->pcm_new(component, rtd);
+               ret = component->driver->pcm_new(rtd);
                if (ret < 0) {
                        dev_err(component->dev,
                                "ASoC: pcm constructor failed: %d\n",