diff mbox series

[11/19] ASoC: soc-card: add snd_soc_card_resume_post()

Message ID 871rn7335a.wl-kuninori.morimoto.gx@renesas.com
State Accepted
Commit 739443d1f162ce80eb717c695e58302958b51239
Headers show
Series [01/19] ASoC: soc.h: convert bool to bit field for snd_soc_card | expand

Commit Message

Kuninori Morimoto May 26, 2020, 1:18 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/soc-card.h |  1 +
 sound/soc/soc-card.c     | 10 ++++++++++
 sound/soc/soc-core.c     |  3 +--
 3 files changed, 12 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/include/sound/soc-card.h b/include/sound/soc-card.h
index 0d4837f3f182..a54711b5c58f 100644
--- a/include/sound/soc-card.h
+++ b/include/sound/soc-card.h
@@ -22,6 +22,7 @@  int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
 int snd_soc_card_suspend_pre(struct snd_soc_card *card);
 int snd_soc_card_suspend_post(struct snd_soc_card *card);
 int snd_soc_card_resume_pre(struct snd_soc_card *card);
+int snd_soc_card_resume_post(struct snd_soc_card *card);
 
 /* device driver data */
 static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
diff --git a/sound/soc/soc-card.c b/sound/soc/soc-card.c
index a5c83363b611..e3b75e0640ab 100644
--- a/sound/soc/soc-card.c
+++ b/sound/soc/soc-card.c
@@ -109,3 +109,13 @@  int snd_soc_card_resume_pre(struct snd_soc_card *card)
 
 	return soc_card_ret(card, ret);
 }
+
+int snd_soc_card_resume_post(struct snd_soc_card *card)
+{
+	int ret = 0;
+
+	if (card->resume_post)
+		ret = card->resume_post(card);
+
+	return soc_card_ret(card, ret);
+}
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 540ee055a1e8..02147acf6547 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -692,8 +692,7 @@  static void soc_resume_deferred(struct work_struct *work)
 		}
 	}
 
-	if (card->resume_post)
-		card->resume_post(card);
+	snd_soc_card_resume_post(card);
 
 	dev_dbg(card->dev, "ASoC: resume work completed\n");