We can use snd_pcm_is_playback/capture(). Let's use it.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/codecs/uda1380.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index 4f8fdd574585b..7ef7b5fc927f2 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c @@ -556,7 +556,7 @@ static int uda1380_pcm_hw_params(struct snd_pcm_substream *substream, uda1380_write(component, UDA1380_PM, R02_PON_PLL | pm); }
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + if (snd_pcm_is_playback(substream)) clk |= R00_EN_DAC | R00_EN_INT; else clk |= R00_EN_ADC | R00_EN_DEC; @@ -577,7 +577,7 @@ static void uda1380_pcm_shutdown(struct snd_pcm_substream *substream, uda1380_write(component, UDA1380_PM, ~R02_PON_PLL & pm); }
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + if (snd_pcm_is_playback(substream)) clk &= ~(R00_EN_DAC | R00_EN_INT); else clk &= ~(R00_EN_ADC | R00_EN_DEC);