Commit f6fcc820 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: audio-graph: move audio_graph_remove() to simple-card-utils.c

audio-graph-card2 can reuse  audio_graph_remove() / asoc_simple_remove().
This patch moves it to simple-card-utils.c.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y2df3uby.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1a456b1c
...@@ -11,6 +11,4 @@ ...@@ -11,6 +11,4 @@
int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev); int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev);
int audio_graph_remove(struct platform_device *pdev);
#endif /* __GRAPH_CARD_H */ #endif /* __GRAPH_CARD_H */
...@@ -177,10 +177,10 @@ int asoc_simple_init_jack(struct snd_soc_card *card, ...@@ -177,10 +177,10 @@ int asoc_simple_init_jack(struct snd_soc_card *card,
int is_hp, char *prefix, char *pin); int is_hp, char *prefix, char *pin);
int asoc_simple_init_priv(struct asoc_simple_priv *priv, int asoc_simple_init_priv(struct asoc_simple_priv *priv,
struct link_info *li); struct link_info *li);
int asoc_simple_remove(struct platform_device *pdev);
int asoc_graph_card_probe(struct snd_soc_card *card); int asoc_graph_card_probe(struct snd_soc_card *card);
#ifdef DEBUG #ifdef DEBUG
static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv,
char *name, char *name,
......
...@@ -743,14 +743,6 @@ static int graph_probe(struct platform_device *pdev) ...@@ -743,14 +743,6 @@ static int graph_probe(struct platform_device *pdev)
return audio_graph_parse_of(priv, dev); return audio_graph_parse_of(priv, dev);
} }
int audio_graph_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
return asoc_simple_clean_reference(card);
}
EXPORT_SYMBOL_GPL(audio_graph_remove);
static const struct of_device_id graph_of_match[] = { static const struct of_device_id graph_of_match[] = {
{ .compatible = "audio-graph-card", }, { .compatible = "audio-graph-card", },
{ .compatible = "audio-graph-scu-card", { .compatible = "audio-graph-scu-card",
...@@ -766,7 +758,7 @@ static struct platform_driver graph_card = { ...@@ -766,7 +758,7 @@ static struct platform_driver graph_card = {
.of_match_table = graph_of_match, .of_match_table = graph_of_match,
}, },
.probe = graph_probe, .probe = graph_probe,
.remove = audio_graph_remove, .remove = asoc_simple_remove,
}; };
module_platform_driver(graph_card); module_platform_driver(graph_card);
......
...@@ -740,6 +740,14 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv, ...@@ -740,6 +740,14 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv,
} }
EXPORT_SYMBOL_GPL(asoc_simple_init_priv); EXPORT_SYMBOL_GPL(asoc_simple_init_priv);
int asoc_simple_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
return asoc_simple_clean_reference(card);
}
EXPORT_SYMBOL_GPL(asoc_simple_remove);
int asoc_graph_card_probe(struct snd_soc_card *card) int asoc_graph_card_probe(struct snd_soc_card *card)
{ {
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card);
......
...@@ -708,13 +708,6 @@ static int asoc_simple_probe(struct platform_device *pdev) ...@@ -708,13 +708,6 @@ static int asoc_simple_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int asoc_simple_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
return asoc_simple_clean_reference(card);
}
static const struct of_device_id simple_of_match[] = { static const struct of_device_id simple_of_match[] = {
{ .compatible = "simple-audio-card", }, { .compatible = "simple-audio-card", },
{ .compatible = "simple-scu-audio-card", { .compatible = "simple-scu-audio-card",
......
...@@ -244,7 +244,7 @@ static struct platform_driver tegra_audio_graph_card = { ...@@ -244,7 +244,7 @@ static struct platform_driver tegra_audio_graph_card = {
.of_match_table = graph_of_tegra_match, .of_match_table = graph_of_tegra_match,
}, },
.probe = tegra_audio_graph_probe, .probe = tegra_audio_graph_probe,
.remove = audio_graph_remove, .remove = asoc_simple_remove,
}; };
module_platform_driver(tegra_audio_graph_card); module_platform_driver(tegra_audio_graph_card);
......
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