Commit 0e7b25c6 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-core: remove legacy_dai_naming from snd_soc_register_dais()

We can get legacy dai name flag from component driver.
Thus, there is no need to have its parameter on snd_soc_register_dais().
Let's remove unneeded parameter
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 359c71ee
...@@ -2783,8 +2783,7 @@ static struct snd_soc_dai *soc_add_dai(struct snd_soc_component *component, ...@@ -2783,8 +2783,7 @@ static struct snd_soc_dai *soc_add_dai(struct snd_soc_component *component,
* parent's name. * parent's name.
*/ */
static int snd_soc_register_dais(struct snd_soc_component *component, static int snd_soc_register_dais(struct snd_soc_component *component,
struct snd_soc_dai_driver *dai_drv, size_t count, struct snd_soc_dai_driver *dai_drv, size_t count)
bool legacy_dai_naming)
{ {
struct device *dev = component->dev; struct device *dev = component->dev;
struct snd_soc_dai *dai; struct snd_soc_dai *dai;
...@@ -2796,7 +2795,7 @@ static int snd_soc_register_dais(struct snd_soc_component *component, ...@@ -2796,7 +2795,7 @@ static int snd_soc_register_dais(struct snd_soc_component *component,
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
dai = soc_add_dai(component, dai_drv + i, dai = soc_add_dai(component, dai_drv + i,
count == 1 && legacy_dai_naming); count == 1 && !component->driver->non_legacy_dai_naming);
if (dai == NULL) { if (dai == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
goto err; goto err;
...@@ -3046,8 +3045,7 @@ int snd_soc_add_component(struct device *dev, ...@@ -3046,8 +3045,7 @@ int snd_soc_add_component(struct device *dev,
} }
} }
ret = snd_soc_register_dais(component, dai_drv, num_dai, ret = snd_soc_register_dais(component, dai_drv, num_dai);
!component_driver->non_legacy_dai_naming);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "ASoC: Failed to register DAIs: %d\n", ret); dev_err(dev, "ASoC: Failed to register DAIs: %d\n", ret);
goto err_cleanup; goto err_cleanup;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment