mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
ASoC: simple-card-utils: tidyup simple_util_clean_reference()
Current code makes old style / new style conversion difficult. To make future conversions easier to understand, this patch clean up the code a little. but no functional change. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/871pdmxixq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -181,7 +181,7 @@ void simple_util_canonicalize_platform(struct snd_soc_dai_link_component *platfo
|
||||
void simple_util_canonicalize_cpu(struct snd_soc_dai_link_component *cpus,
|
||||
int is_single_links);
|
||||
|
||||
void simple_util_clean_reference(struct snd_soc_card *card);
|
||||
void simple_util_clean_reference(struct simple_util_priv *priv);
|
||||
|
||||
void simple_util_parse_convert(struct device_node *np, char *prefix,
|
||||
struct simple_util_data *data);
|
||||
|
||||
@@ -605,7 +605,7 @@ int audio_graph_parse_of(struct simple_util_priv *priv, struct device *dev)
|
||||
ret = devm_snd_soc_register_card(dev, card);
|
||||
err:
|
||||
if (ret < 0) {
|
||||
simple_util_clean_reference(card);
|
||||
simple_util_clean_reference(priv);
|
||||
return dev_err_probe(dev, ret, "parse error\n");
|
||||
}
|
||||
end:
|
||||
|
||||
@@ -1370,7 +1370,7 @@ int audio_graph2_parse_of(struct simple_util_priv *priv, struct device *dev,
|
||||
ret = devm_snd_soc_register_card(dev, card);
|
||||
err:
|
||||
if (ret < 0) {
|
||||
simple_util_clean_reference(card);
|
||||
simple_util_clean_reference(priv);
|
||||
return dev_err_probe(dev, ret, "parse error\n");
|
||||
}
|
||||
end:
|
||||
|
||||
@@ -752,11 +752,12 @@ void simple_util_canonicalize_cpu(struct snd_soc_dai_link_component *cpus,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(simple_util_canonicalize_cpu);
|
||||
|
||||
void simple_util_clean_reference(struct snd_soc_card *card)
|
||||
void simple_util_clean_reference(struct simple_util_priv *priv)
|
||||
{
|
||||
struct snd_soc_dai_link *dai_link;
|
||||
struct snd_soc_dai_link_component *cpu;
|
||||
struct snd_soc_dai_link_component *codec;
|
||||
struct snd_soc_card *card = simple_priv_to_card(priv);
|
||||
int i, j;
|
||||
|
||||
for_each_card_prelinks(card, i, dai_link) {
|
||||
@@ -996,8 +997,9 @@ EXPORT_SYMBOL_GPL(simple_util_init_priv);
|
||||
void simple_util_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||
struct simple_util_priv *priv = snd_soc_card_get_drvdata(card);
|
||||
|
||||
simple_util_clean_reference(card);
|
||||
simple_util_clean_reference(priv);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(simple_util_remove);
|
||||
|
||||
|
||||
@@ -731,7 +731,7 @@ static int simple_parse_of(struct simple_util_priv *priv)
|
||||
ret = devm_snd_soc_register_card(dev, card);
|
||||
err:
|
||||
if (ret < 0) {
|
||||
simple_util_clean_reference(card);
|
||||
simple_util_clean_reference(priv);
|
||||
return dev_err_probe(dev, ret, "parse error\n");
|
||||
}
|
||||
end:
|
||||
|
||||
Reference in New Issue
Block a user