ASoC: soc-pcm: move dai_get_widget()

This patch moves dai_get_widget() to top side.
This is prepare for cleanup soc-pcm.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87h7zpbouu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2020-02-17 17:27:39 +09:00 committed by Mark Brown
parent 8b59e642d0
commit d9303690f7
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 9 additions and 9 deletions

View File

@ -82,6 +82,15 @@ static int soc_rtd_trigger(struct snd_soc_pcm_runtime *rtd,
return 0; return 0;
} }
static inline
struct snd_soc_dapm_widget *dai_get_widget(struct snd_soc_dai *dai, int stream)
{
if (stream == SNDRV_PCM_STREAM_PLAYBACK)
return dai->playback_widget;
else
return dai->capture_widget;
}
static void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd, static void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
int stream, int action) int stream, int action)
{ {
@ -1287,15 +1296,6 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
return NULL; return NULL;
} }
static inline struct snd_soc_dapm_widget *
dai_get_widget(struct snd_soc_dai *dai, int stream)
{
if (stream == SNDRV_PCM_STREAM_PLAYBACK)
return dai->playback_widget;
else
return dai->capture_widget;
}
static int widget_in_list(struct snd_soc_dapm_widget_list *list, static int widget_in_list(struct snd_soc_dapm_widget_list *list,
struct snd_soc_dapm_widget *widget) struct snd_soc_dapm_widget *widget)
{ {