Skip to content

Commit

Permalink
ASoC: audio-graph: move asoc_graph_card_probe() to simple-card-utils.c
Browse files Browse the repository at this point in the history
audio-graph-card2 can reuse asoc_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 Dec 8, 2020
1 parent 678288b commit dfb28ee
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
17 changes: 0 additions & 17 deletions sound/soc/generic/audio-graph-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,23 +710,6 @@ static void graph_get_dais_count(struct asoc_simple_priv *priv,
graph_count_dpcm);
}

int asoc_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(asoc_graph_card_probe);

static int graph_probe(struct platform_device *pdev)
{
struct asoc_simple_priv *priv;
Expand Down
17 changes: 17 additions & 0 deletions sound/soc/generic/simple-card-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,23 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv,
}
EXPORT_SYMBOL_GPL(asoc_simple_init_priv);

int asoc_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(asoc_graph_card_probe);

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

0 comments on commit dfb28ee

Please sign in to comment.