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

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.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1a456b1c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -11,6 +11,4 @@

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 */
+1 −1
Original line number Diff line number Diff line
@@ -177,10 +177,10 @@ int asoc_simple_init_jack(struct snd_soc_card *card,
			       int is_hp, char *prefix, char *pin);
int asoc_simple_init_priv(struct asoc_simple_priv *priv,
			       struct link_info *li);
int asoc_simple_remove(struct platform_device *pdev);

int asoc_graph_card_probe(struct snd_soc_card *card);


#ifdef DEBUG
static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv,
					 char *name,
+1 −9
Original line number Diff line number Diff line
@@ -743,14 +743,6 @@ static int graph_probe(struct platform_device *pdev)
	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[] = {
	{ .compatible = "audio-graph-card", },
	{ .compatible = "audio-graph-scu-card",
@@ -766,7 +758,7 @@ static struct platform_driver graph_card = {
		.of_match_table = graph_of_match,
	},
	.probe = graph_probe,
	.remove = audio_graph_remove,
	.remove = asoc_simple_remove,
};
module_platform_driver(graph_card);

+8 −0
Original line number Diff line number Diff line
@@ -740,6 +740,14 @@ int asoc_simple_init_priv(struct asoc_simple_priv *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)
{
	struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card);
+0 −7
Original line number Diff line number Diff line
@@ -708,13 +708,6 @@ static int asoc_simple_probe(struct platform_device *pdev)
	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[] = {
	{ .compatible = "simple-audio-card", },
	{ .compatible = "simple-scu-audio-card",
Loading