Skip to content
Permalink
Browse files
ASoC: audio-graph: move audio_graph_card_probe() to simple-card-utils.c
audio-graph-card2 can reuse audio_graph_card_probe().
This patch moves it to simple-card-utils.c.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  • Loading branch information
morimoto committed Feb 16, 2021
1 parent 0f03671 commit 153639a8fed780ad137c3ced7a41005a0ede704a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
@@ -712,23 +712,6 @@ static void graph_get_dais_count(struct asoc_simple_priv *priv,
graph_count_dpcm);
}

int audio_graph_card_probe(struct snd_soc_card *card)
{
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card);
int ret;

ret = asoc_simple_init_hp(card, &priv->hp_jack, NULL);
if (ret < 0)
return ret;

ret = asoc_simple_init_mic(card, &priv->mic_jack, NULL);
if (ret < 0)
return ret;

return 0;
}
EXPORT_SYMBOL_GPL(audio_graph_card_probe);

static int graph_probe(struct platform_device *pdev)
{
struct asoc_simple_priv *priv;
@@ -739,6 +739,23 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv,
}
EXPORT_SYMBOL_GPL(asoc_simple_init_priv);

int audio_graph_card_probe(struct snd_soc_card *card)
{
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card);
int ret;

ret = asoc_simple_init_hp(card, &priv->hp_jack, NULL);
if (ret < 0)
return ret;

ret = asoc_simple_init_mic(card, &priv->mic_jack, NULL);
if (ret < 0)
return ret;

return 0;
}
EXPORT_SYMBOL_GPL(audio_graph_card_probe);

/* Module information */
MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
MODULE_DESCRIPTION("ALSA SoC Simple Card Utils");

0 comments on commit 153639a

Please sign in to comment.