summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-11-05 15:46:55 +0900
committerMark Brown <broonie@kernel.org>2019-11-05 23:50:30 +0000
commitdaf7737335bf555abf14031530fe8e47b46b373a (patch)
tree0bdcb6b48d33294ec20b739fb61d731befc3e54d /sound/soc
parentac6a4dd3e9f09697ab6a1774d7ab6a34e7ab36fa (diff)
ASoC: soc-core: move snd_soc_register_dai()
This patch moves snd_soc_register_dai() next to snd_soc_register_dais(). This is prepare for snd_soc_register_dais() cleanup. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87y2wu2528.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0ce333669138..fb5f01497498 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2598,42 +2598,6 @@ static struct snd_soc_dai *soc_add_dai(struct snd_soc_component *component,
}
/**
- * snd_soc_register_dais - Register a DAI with the ASoC core
- *
- * @component: The component the DAIs are registered for
- * @dai_drv: DAI driver to use for the DAIs
- * @count: Number of DAIs
- */
-static int snd_soc_register_dais(struct snd_soc_component *component,
- struct snd_soc_dai_driver *dai_drv,
- size_t count)
-{
- struct device *dev = component->dev;
- struct snd_soc_dai *dai;
- unsigned int i;
- int ret;
-
- dev_dbg(dev, "ASoC: dai register %s #%zu\n", dev_name(dev), count);
-
- for (i = 0; i < count; i++) {
-
- dai = soc_add_dai(component, dai_drv + i, count == 1 &&
- !component->driver->non_legacy_dai_naming);
- if (dai == NULL) {
- ret = -ENOMEM;
- goto err;
- }
- }
-
- return 0;
-
-err:
- snd_soc_unregister_dais(component);
-
- return ret;
-}
-
-/**
* snd_soc_register_dai - Register a DAI dynamically & create its widgets
*
* @component: The component the DAIs are registered for
@@ -2676,6 +2640,42 @@ int snd_soc_register_dai(struct snd_soc_component *component,
}
EXPORT_SYMBOL_GPL(snd_soc_register_dai);
+/**
+ * snd_soc_register_dais - Register a DAI with the ASoC core
+ *
+ * @component: The component the DAIs are registered for
+ * @dai_drv: DAI driver to use for the DAIs
+ * @count: Number of DAIs
+ */
+static int snd_soc_register_dais(struct snd_soc_component *component,
+ struct snd_soc_dai_driver *dai_drv,
+ size_t count)
+{
+ struct device *dev = component->dev;
+ struct snd_soc_dai *dai;
+ unsigned int i;
+ int ret;
+
+ dev_dbg(dev, "ASoC: dai register %s #%zu\n", dev_name(dev), count);
+
+ for (i = 0; i < count; i++) {
+
+ dai = soc_add_dai(component, dai_drv + i, count == 1 &&
+ !component->driver->non_legacy_dai_naming);
+ if (dai == NULL) {
+ ret = -ENOMEM;
+ goto err;
+ }
+ }
+
+ return 0;
+
+err:
+ snd_soc_unregister_dais(component);
+
+ return ret;
+}
+
static int snd_soc_component_initialize(struct snd_soc_component *component,
const struct snd_soc_component_driver *driver, struct device *dev)
{