mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
ASoC: simple-card: rename to asoc_simple_card_canonicalize_platform()
Current simple-card is using asoc_simple_card_canonicalize_dailink(). Its naming is "dailink", but is for "platform". We already have asoc_simple_card_canonicalize_cpu() for "cpu", let's follow same naming rule. It never return error, so, void function is better idea. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
10dff9b0dd
commit
fe7ed4dec2
@ -108,7 +108,7 @@ int asoc_simple_card_parse_graph_dai(struct device_node *ep,
|
||||
int asoc_simple_card_init_dai(struct snd_soc_dai *dai,
|
||||
struct asoc_simple_dai *simple_dai);
|
||||
|
||||
int asoc_simple_card_canonicalize_dailink(struct snd_soc_dai_link *dai_link);
|
||||
void asoc_simple_card_canonicalize_platform(struct snd_soc_dai_link *dai_link);
|
||||
void asoc_simple_card_canonicalize_cpu(struct snd_soc_dai_link *dai_link,
|
||||
int is_single_links);
|
||||
|
||||
|
@ -307,14 +307,12 @@ static int graph_dai_link_of_dpcm(struct graph_priv *priv,
|
||||
"prefix");
|
||||
}
|
||||
|
||||
asoc_simple_card_canonicalize_platform(dai_link);
|
||||
|
||||
ret = asoc_simple_card_of_parse_tdm(ep, dai);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = asoc_simple_card_canonicalize_dailink(dai_link);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = asoc_simple_card_parse_daifmt(dev, cpu_ep, codec_ep,
|
||||
NULL, &dai_link->dai_fmt);
|
||||
if (ret < 0)
|
||||
@ -405,10 +403,6 @@ static int graph_dai_link_of(struct graph_priv *priv,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = asoc_simple_card_canonicalize_dailink(dai_link);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = asoc_simple_card_set_dailink_name(dev, dai_link,
|
||||
"%s-%s",
|
||||
dai_link->cpu_dai_name,
|
||||
@ -419,6 +413,7 @@ static int graph_dai_link_of(struct graph_priv *priv,
|
||||
dai_link->ops = &graph_ops;
|
||||
dai_link->init = graph_dai_init;
|
||||
|
||||
asoc_simple_card_canonicalize_platform(dai_link);
|
||||
asoc_simple_card_canonicalize_cpu(dai_link,
|
||||
of_graph_get_endpoint_count(dai_link->cpu_of_node) == 1);
|
||||
|
||||
|
@ -394,16 +394,13 @@ int asoc_simple_card_init_dai(struct snd_soc_dai *dai,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(asoc_simple_card_init_dai);
|
||||
|
||||
int asoc_simple_card_canonicalize_dailink(struct snd_soc_dai_link *dai_link)
|
||||
void asoc_simple_card_canonicalize_platform(struct snd_soc_dai_link *dai_link)
|
||||
{
|
||||
/* Assumes platform == cpu */
|
||||
if (!dai_link->platforms->of_node)
|
||||
dai_link->platforms->of_node = dai_link->cpu_of_node;
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(asoc_simple_card_canonicalize_dailink);
|
||||
EXPORT_SYMBOL_GPL(asoc_simple_card_canonicalize_platform);
|
||||
|
||||
void asoc_simple_card_canonicalize_cpu(struct snd_soc_dai_link *dai_link,
|
||||
int is_single_links)
|
||||
|
@ -297,14 +297,12 @@ static int simple_dai_link_of_dpcm(struct simple_priv *priv,
|
||||
|
||||
simple_get_conversion(dev, np, &dai_props->adata);
|
||||
|
||||
asoc_simple_card_canonicalize_platform(dai_link);
|
||||
|
||||
ret = asoc_simple_card_of_parse_tdm(np, dai);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = asoc_simple_card_canonicalize_dailink(dai_link);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
snprintf(prop, sizeof(prop), "%smclk-fs", prefix);
|
||||
of_property_read_u32(top, PREFIX "mclk-fs", &dai_props->mclk_fs);
|
||||
of_property_read_u32(node, prop, &dai_props->mclk_fs);
|
||||
@ -409,10 +407,6 @@ static int simple_dai_link_of(struct simple_priv *priv,
|
||||
if (ret < 0)
|
||||
goto dai_link_of_err;
|
||||
|
||||
ret = asoc_simple_card_canonicalize_dailink(dai_link);
|
||||
if (ret < 0)
|
||||
goto dai_link_of_err;
|
||||
|
||||
ret = asoc_simple_card_set_dailink_name(dev, dai_link,
|
||||
"%s-%s",
|
||||
dai_link->cpu_dai_name,
|
||||
@ -424,6 +418,7 @@ static int simple_dai_link_of(struct simple_priv *priv,
|
||||
dai_link->init = simple_dai_init;
|
||||
|
||||
asoc_simple_card_canonicalize_cpu(dai_link, single_cpu);
|
||||
asoc_simple_card_canonicalize_platform(dai_link);
|
||||
|
||||
dai_link_of_err:
|
||||
of_node_put(node);
|
||||
|
Loading…
Reference in New Issue
Block a user