]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 08:28:48 +0000 (09:28 +0100)
commit5391e32b9d0692abb1996ba3c3fdf2e0c97b72e4
tree2ff83d95f8227baabdc346f613ce3d20f4055528
parentde2324a00979257c7fff8cf9f2bdc3023957fef8
ASoC: wm_adsp: Fix dma-unsafe read of scratch registers

[ Upstream commit 20e00db2f59bdddf8a8e241473ef8be94631d3ae ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/wm_adsp.c