Skip to content

Commit 739443d

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-card: add snd_soc_card_resume_post()
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 934c752 commit 739443d

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

include/sound/soc-card.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
2222
int snd_soc_card_suspend_pre(struct snd_soc_card *card);
2323
int snd_soc_card_suspend_post(struct snd_soc_card *card);
2424
int snd_soc_card_resume_pre(struct snd_soc_card *card);
25+
int snd_soc_card_resume_post(struct snd_soc_card *card);
2526

2627
/* device driver data */
2728
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,

sound/soc/soc-card.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,13 @@ int snd_soc_card_resume_pre(struct snd_soc_card *card)
109109

110110
return soc_card_ret(card, ret);
111111
}
112+
113+
int snd_soc_card_resume_post(struct snd_soc_card *card)
114+
{
115+
int ret = 0;
116+
117+
if (card->resume_post)
118+
ret = card->resume_post(card);
119+
120+
return soc_card_ret(card, ret);
121+
}

sound/soc/soc-core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,7 @@ static void soc_resume_deferred(struct work_struct *work)
692692
}
693693
}
694694

695-
if (card->resume_post)
696-
card->resume_post(card);
695+
snd_soc_card_resume_post(card);
697696

698697
dev_dbg(card->dev, "ASoC: resume work completed\n");
699698

0 commit comments

Comments
 (0)