Skip to content

Commit d17b60b

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-card: add snd_soc_card_suspend_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 130dc08 commit d17b60b

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
@@ -20,6 +20,7 @@ int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
2020
struct snd_soc_jack_pin *pins, unsigned int num_pins);
2121

2222
int snd_soc_card_suspend_pre(struct snd_soc_card *card);
23+
int snd_soc_card_suspend_post(struct snd_soc_card *card);
2324

2425
/* device driver data */
2526
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
@@ -89,3 +89,13 @@ int snd_soc_card_suspend_pre(struct snd_soc_card *card)
8989

9090
return soc_card_ret(card, ret);
9191
}
92+
93+
int snd_soc_card_suspend_post(struct snd_soc_card *card)
94+
{
95+
int ret = 0;
96+
97+
if (card->suspend_post)
98+
ret = card->suspend_post(card);
99+
100+
return soc_card_ret(card, ret);
101+
}

sound/soc/soc-core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,7 @@ int snd_soc_suspend(struct device *dev)
631631
}
632632
}
633633

634-
if (card->suspend_post)
635-
card->suspend_post(card);
634+
snd_soc_card_suspend_post(card);
636635

637636
return 0;
638637
}

0 commit comments

Comments
 (0)