linux/sound/soc/kirkwood
Russell King c9bd5e690a DMA-API: sound: fix dma mask handling in a lot of drivers
This code sequence is unsafe in modules:

static u64 mask = DMA_BIT_MASK(something);
...
	if (!dev->dma_mask)
		dev->dma_mask = &mask;

as if a module is reloaded, the mask will be pointing at the original
module's mask address, and this can lead to oopses.  Moreover, they
all follow this with:

	if (!dev->coherent_dma_mask)
		dev->coherent_dma_mask = mask;

where 'mask' is the same value as the statically defined mask, and this
bypasses the architecture's check on whether the DMA mask is possible.

Fix these issues by using the new dma_coerce_coherent_and_mask()
function.

Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-10-31 14:48:47 +00:00
..
Kconfig ASoc: kirkwood: Use the Kirkwood audio driver in Dove boards 2013-08-27 22:01:59 +01:00
kirkwood-dma.c DMA-API: sound: fix dma mask handling in a lot of drivers 2013-10-31 14:48:47 +00:00
kirkwood-i2s.c ASoC: kirkwood: change the compatible string of the kirkwood-i2s driver 2013-09-06 10:29:58 +01:00
kirkwood-openrd.c ASoC: kirkwood: combine kirkwood-i2s and kirkwood-dma drivers 2013-08-05 18:06:30 +01:00
kirkwood-t5325.c ASoC: kirkwood: combine kirkwood-i2s and kirkwood-dma drivers 2013-08-05 18:06:30 +01:00
kirkwood.h ASoC: kirkwood: move calculation of max buffer size to kirkwood.h 2013-08-05 18:06:57 +01:00
Makefile ASoC: kirkwood: combine kirkwood-i2s and kirkwood-dma drivers 2013-08-05 18:06:30 +01:00