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

ASoC: soc-card: add snd_soc_card_remove()



Card related function should be implemented at soc-card now.
This patch adds it.

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87tv00zv4p.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5c0eac03
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ int snd_soc_card_resume_post(struct snd_soc_card *card);

int snd_soc_card_probe(struct snd_soc_card *card);
int snd_soc_card_late_probe(struct snd_soc_card *card);
int snd_soc_card_remove(struct snd_soc_card *card);

/* device driver data */
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
+13 −0
Original line number Diff line number Diff line
@@ -166,3 +166,16 @@ int snd_soc_card_late_probe(struct snd_soc_card *card)

	return 0;
}

int snd_soc_card_remove(struct snd_soc_card *card)
{
	int ret = 0;

	if (card->probed &&
	    card->remove)
		ret = card->remove(card);

	card->probed = 0;

	return soc_card_ret(card, ret);
}
+1 −3
Original line number Diff line number Diff line
@@ -1747,9 +1747,7 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
	soc_cleanup_card_debugfs(card);

	/* remove the card */
	if (card->probed && card->remove)
		card->remove(card);
	card->probed = 0;
	snd_soc_card_remove(card);

	if (card->snd_card) {
		snd_card_free(card->snd_card);