mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 11:34:58 +00:00
ASoC: soc-card: add snd_soc_card_add_dai_link()
Card related function should be implemented at soc-card now. This patch adds it. This patch adds missing return when error case. 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]>
This commit is contained in:
@@ -35,6 +35,9 @@ int snd_soc_card_set_bias_level_post(struct snd_soc_card *card,
|
||||
struct snd_soc_dapm_context *dapm,
|
||||
enum snd_soc_bias_level level);
|
||||
|
||||
int snd_soc_card_add_dai_link(struct snd_soc_card *card,
|
||||
struct snd_soc_dai_link *dai_link);
|
||||
|
||||
/* device driver data */
|
||||
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
|
||||
void *data)
|
||||
|
||||
@@ -203,3 +203,15 @@ int snd_soc_card_set_bias_level_post(struct snd_soc_card *card,
|
||||
|
||||
return soc_card_ret(card, ret);
|
||||
}
|
||||
|
||||
int snd_soc_card_add_dai_link(struct snd_soc_card *card,
|
||||
struct snd_soc_dai_link *dai_link)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (card->add_dai_link)
|
||||
ret = card->add_dai_link(card, dai_link);
|
||||
|
||||
return soc_card_ret(card, ret);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_card_add_dai_link);
|
||||
|
||||
@@ -978,8 +978,9 @@ int snd_soc_add_pcm_runtime(struct snd_soc_card *card,
|
||||
/*
|
||||
* Notify the machine driver for extra initialization
|
||||
*/
|
||||
if (card->add_dai_link)
|
||||
card->add_dai_link(card, dai_link);
|
||||
ret = snd_soc_card_add_dai_link(card, dai_link);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (dai_link->ignore)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user