layerscape: add patches-5.4
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 801-audio-0038-MLK-17467-ASoC-fsl_sai-fix-typo-for-fsl_sai.patch
1 From b22f55e1f41ebe218604f12c127d299a2c302393 Mon Sep 17 00:00:00 2001
2 From: Shengjiu Wang <shengjiu.wang@nxp.com>
3 Date: Fri, 26 Jan 2018 16:44:19 +0800
4 Subject: [PATCH] MLK-17467: ASoC: fsl_sai: fix typo for fsl_sai
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Fix build warning
10
11 sound/soc/fsl/fsl_sai.c: In function ‘fsl_sai_trigger’:
12 sound/soc/fsl/fsl_sai.c:736:3: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation]
13 while (tx && i < channels)
14 ^~~~~
15 sound/soc/fsl/fsl_sai.c:742:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘while’
16 j++;
17 ^
18 Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
19 ---
20 sound/soc/fsl/fsl_sai.c | 5 ++---
21 1 file changed, 2 insertions(+), 3 deletions(-)
22
23 --- a/sound/soc/fsl/fsl_sai.c
24 +++ b/sound/soc/fsl/fsl_sai.c
25 @@ -727,9 +727,8 @@ static int fsl_sai_trigger(struct snd_pc
26 case SNDRV_PCM_TRIGGER_RESUME:
27 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
28
29 - for (i = 0; tx && i < channels; i++) {
30 - while (tx && i < channels)
31 - if (sai->dataline[tx] & (1 << j)) {
32 + while (tx && i < channels) {
33 + if ((sai->is_dsd ? sai->dataline_dsd[tx] : sai->dataline[tx]) & (1 << j)) {
34 regmap_write(sai->regmap, FSL_SAI_TDR0 + j * 0x4, 0x0);
35 i++;
36 k++;