diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-11-18 16:16:48 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-11-21 08:27:03 -0500 |
commit | e6e969f1fd332e7525c577c0d8cfcbe898409abd (patch) | |
tree | 157302c27186490a0b85c7c3833ed7f4ac27ef86 | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) |
ASoC: sh: fix fsi build warnings for 64 bit
As this driver can now be compiled for ARM64, we get a new warning
as a result of passing a DMA filter data pointer through an 'int':
sound/soc/sh/fsi.c: In function 'fsi_dma_probe':
sound/soc/sh/fsi.c:1372:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
shdma_chan_filter, (void *)io->dma_id,
We already know that we only need the legacy filter function on
arch/sh, so we can hide the legacy DMA interface function
behind an #ifdef. This has the other advantage of no longer
depending on the shdma_chan_filter function to be visible.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sh/fsi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 0215c78cbddf..ead520182e26 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -1362,15 +1362,18 @@ static int fsi_dma_push_start_stop(struct fsi_priv *fsi, struct fsi_stream *io, | |||
1362 | 1362 | ||
1363 | static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct device *dev) | 1363 | static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct device *dev) |
1364 | { | 1364 | { |
1365 | dma_cap_mask_t mask; | ||
1366 | int is_play = fsi_stream_is_play(fsi, io); | 1365 | int is_play = fsi_stream_is_play(fsi, io); |
1367 | 1366 | ||
1367 | #ifdef CONFIG_SUPERH | ||
1368 | dma_cap_mask_t mask; | ||
1368 | dma_cap_zero(mask); | 1369 | dma_cap_zero(mask); |
1369 | dma_cap_set(DMA_SLAVE, mask); | 1370 | dma_cap_set(DMA_SLAVE, mask); |
1370 | 1371 | ||
1371 | io->chan = dma_request_slave_channel_compat(mask, | 1372 | io->chan = dma_request_channel(mask, shdma_chan_filter, |
1372 | shdma_chan_filter, (void *)io->dma_id, | 1373 | (void *)io->dma_id); |
1373 | dev, is_play ? "tx" : "rx"); | 1374 | #else |
1375 | io->chan = dma_request_slave_channel(dev, is_play ? "tx" : "rx"); | ||
1376 | #endif | ||
1374 | if (io->chan) { | 1377 | if (io->chan) { |
1375 | struct dma_slave_config cfg = {}; | 1378 | struct dma_slave_config cfg = {}; |
1376 | int ret; | 1379 | int ret; |