ASoC: samsung: pass DMA channels as pointers
ARM64 allmodconfig produces a bunch of warnings when building the samsung ASoC code: sound/soc/samsung/dmaengine.c: In function 'samsung_asoc_init_dma_data': sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] playback_data->filter_data = (void *)playback->channel; sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] capture_data->filter_data = (void *)capture->channel; We could easily shut up the warning by adding an intermediate cast, but there is a bigger underlying problem: The use of IORESOURCE_DMA to pass data from platform code to device drivers is dubious to start with, as what we really want is a pointer that can be passed into a filter function. Note that on s3c64xx, the pl08x DMA data is already a pointer, but gets cast to resource_size_t so we can pass it as a resource, and it then gets converted back to a pointer. In contrast, the data we pass for s3c24xx is an index into a device specific table, and we artificially convert that into a pointer for the filter function. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
8005c49d9a
commit
b9a1a74381
@@ -50,14 +50,14 @@ void samsung_asoc_init_dma_data(struct snd_soc_dai *dai,
|
||||
|
||||
if (playback) {
|
||||
playback_data = &playback->dma_data;
|
||||
playback_data->filter_data = (void *)playback->channel;
|
||||
playback_data->filter_data = playback->slave;
|
||||
playback_data->chan_name = playback->ch_name;
|
||||
playback_data->addr = playback->dma_addr;
|
||||
playback_data->addr_width = playback->dma_size;
|
||||
}
|
||||
if (capture) {
|
||||
capture_data = &capture->dma_data;
|
||||
capture_data->filter_data = (void *)capture->channel;
|
||||
capture_data->filter_data = capture->slave;
|
||||
capture_data->chan_name = capture->ch_name;
|
||||
capture_data->addr = capture->dma_addr;
|
||||
capture_data->addr_width = capture->dma_size;
|
||||
|
Reference in New Issue
Block a user