ASoC: rt5514: Fix rt5514_spi_burst_read() buffer passing

rt5514_dsp_voice_wake_up_put() passes "(u8 *)&buf" to
rt5514_spi_burst_read(), where the cast is needed to silence a compiler
warning:

    sound/soc/codecs/rt5514.c: In function ‘rt5514_dsp_voice_wake_up_put’:
    sound/soc/codecs/rt5514.c:357: warning: passing argument 2 of ‘rt5514_spi_burst_read’ from incompatible pointer type

However, as the variable is declared as an array ("u8 buf[8]"), the
function should just pass "buf" instead.

Fixes: fc9cab0583 ("ASoC: rt5514: The DSP clock can be calibrated by the other clock source")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Geert Uytterhoeven 2018-01-30 14:19:42 +01:00 committed by Mark Brown
parent 04e8262ac8
commit 29838a5c1e
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 2 deletions

View File

@ -353,8 +353,7 @@ static int rt5514_dsp_voice_wake_up_put(struct snd_kcontrol *kcontrol,
msleep(20);
#if IS_ENABLED(CONFIG_SND_SOC_RT5514_SPI)
rt5514_spi_burst_read(RT5514_PLL3_CALIB_CTRL6 |
RT5514_DSP_MAPPING,
(u8 *)&buf, sizeof(buf));
RT5514_DSP_MAPPING, buf, sizeof(buf));
#else
dev_err(component->dev, "There is no SPI driver for"
" loading the firmware\n");