]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm_adsp: Fix dma-unsafe read of scratch registers
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 12 Nov 2018 13:36:38 +0000 (13:36 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 13 Nov 2018 18:08:47 +0000 (10:08 -0800)
commitd938e7117a34aefecfc75af5d41696e4848ff533
treefc6ca8888b69b27a87f5fffb3b5d6f16857714c3
parentca46f5aaf2c07b76e0a286d4999617f0b74d96b4
ASoC: wm_adsp: Fix dma-unsafe read of scratch registers

Stack memory isn't DMA-safe so it isn't safe to use either
regmap_raw_read or regmap_bulk_read to read into stack memory.

The two functions to read the scratch registers were using
stack memory and regmap_raw_read. It's not worth allocating
memory just for this trivial read, and it isn't time-critical.
A simple regmap_read for each register is sufficient.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c