[PATCH 09/19] ASoC: soc-card: add snd_soc_card_suspend_post()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue May 26 03:17:45 CEST 2020
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
Card related function should be implemented at soc-card now.
This patch adds it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at 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 --git a/include/sound/soc-card.h b/include/sound/soc-card.h
index db95d6896b4a..4a6787a7021f 100644
--- a/include/sound/soc-card.h
+++ b/include/sound/soc-card.h
@@ -20,6 +20,7 @@ int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
unsigned int num_pins);
int snd_soc_card_suspend_pre(struct snd_soc_card *card);
+int snd_soc_card_suspend_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 643704febe5f..1853c7aa0dfd 100644
--- a/sound/soc/soc-card.c
+++ b/sound/soc/soc-card.c
@@ -89,3 +89,13 @@ int snd_soc_card_suspend_pre(struct snd_soc_card *card)
return soc_card_ret(card, ret);
}
+
+int snd_soc_card_suspend_post(struct snd_soc_card *card)
+{
+ int ret = 0;
+
+ if (card->suspend_post)
+ ret = card->suspend_post(card);
+
+ return soc_card_ret(card, ret);
+}
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 52d09fa495c3..c0327995efc1 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -631,8 +631,7 @@ int snd_soc_suspend(struct device *dev)
}
}
- if (card->suspend_post)
- card->suspend_post(card);
+ snd_soc_card_suspend_post(card);
return 0;
}
--
2.17.1
More information about the Alsa-devel
mailing list