diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-12-10 01:34:27 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-12-10 14:17:09 +0100 |
commit | 9e9c70a5dd0194f6a30a04d96dd8c1f6ff44f6c4 (patch) | |
tree | 84f1b5b495816b5d379e2c19993d2166499a016f /sound/soc/soc-core.c | |
parent | ASoC: soc-core: rename snd_soc_remove_dai_link() to snd_soc_remove_pcm_runtime() (diff) | |
download | linux-9e9c70a5dd0194f6a30a04d96dd8c1f6ff44f6c4.tar.xz linux-9e9c70a5dd0194f6a30a04d96dd8c1f6ff44f6c4.zip |
ASoC: soc-core: move soc_link_dai_pcm_new()
This patch moves soc_link_dai_pcm_new() to upper side.
This is prepare for its cleanup.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/874ky9yq5o.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f82d521306b7..8ace5f5b251c 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1102,6 +1102,27 @@ _err_defer: } EXPORT_SYMBOL_GPL(snd_soc_add_pcm_runtime); +static int soc_link_dai_pcm_new(struct snd_soc_dai **dais, int num_dais, + struct snd_soc_pcm_runtime *rtd) +{ + int i, ret = 0; + + for (i = 0; i < num_dais; ++i) { + struct snd_soc_dai_driver *drv = dais[i]->driver; + + if (drv->pcm_new) + ret = drv->pcm_new(rtd, dais[i]); + if (ret < 0) { + dev_err(dais[i]->dev, + "ASoC: Failed to bind %s with pcm device\n", + dais[i]->name); + return ret; + } + } + + return 0; +} + static void soc_set_of_name_prefix(struct snd_soc_component *component) { struct device_node *of_node = soc_component_to_node(component); @@ -1379,27 +1400,6 @@ static int soc_probe_link_components(struct snd_soc_card *card) return 0; } -static int soc_link_dai_pcm_new(struct snd_soc_dai **dais, int num_dais, - struct snd_soc_pcm_runtime *rtd) -{ - int i, ret = 0; - - for (i = 0; i < num_dais; ++i) { - struct snd_soc_dai_driver *drv = dais[i]->driver; - - if (drv->pcm_new) - ret = drv->pcm_new(rtd, dais[i]); - if (ret < 0) { - dev_err(dais[i]->dev, - "ASoC: Failed to bind %s with pcm device\n", - dais[i]->name); - return ret; - } - } - - return 0; -} - static int soc_link_init(struct snd_soc_card *card, struct snd_soc_pcm_runtime *rtd) { |