ASoC: soc-card: add snd_soc_card_resume_post()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 28 May 2020 01:49:02 +0000 (10:49 +0900)
committerMark Brown <broonie@kernel.org>
Sat, 30 May 2020 01:11:35 +0000 (02:11 +0100)
Card related function should be implemented at soc-card now.
This patch adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87y2pczv5d.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-card.h
sound/soc/soc-card.c
sound/soc/soc-core.c

index 23490df0f1894f21a57b44fa7013b30b78a86c58..ab2410397d0ec5405253e74914e906d5ea56e997 100644 (file)
@@ -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,
index 78dc305684165cdadcd022f9c84ac3fd4b163287..dc14179a1e0fe700e9b62f4903cc989376a410ad 100644 (file)
@@ -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);
+}
index 540ee055a1e8c8a25c4a2da6bbb496a9e4ec6cf8..02147acf6547568537d633ec5ba794c9cc902fd0 100644 (file)
@@ -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");