aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-06-19 03:40:30 -0400
committerMark Brown <broonie@linaro.org>2014-06-21 16:01:01 -0400
commitcd7bcc6000165f6215d15e2e32b58a646e5de5ec (patch)
tree017580f5440efbfa7692d94c9c922012daa6fb73
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
ASoC: rcar: Fix dma direction type
dmaengine_prep_slave_single() expects a enum dma_transfer_direction and not a enum dma_data_direction. Since the integer representations of both DMA_TO_DEVICE and DMA_MEM_TO_DEV aswell as DMA_FROM_DEVICE and DMA_DEV_TO_MEM have the same value the code worked fine even though it was using the wrong type. Fixes the following warning from sparse: sound/soc/sh/rcar/core.c:227:49: warning: mixing different enum types sound/soc/sh/rcar/core.c:227:49: int enum dma_data_direction versus sound/soc/sh/rcar/core.c:227:49: int enum dma_transfer_direction Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/sh/rcar/core.c2
-rw-r--r--sound/soc/sh/rcar/rsnd.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 91880156e1ae..7bdda8fbde87 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -363,7 +363,7 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
363 if (ret < 0) 363 if (ret < 0)
364 goto rsnd_dma_init_err; 364 goto rsnd_dma_init_err;
365 365
366 dma->dir = is_play ? DMA_TO_DEVICE : DMA_FROM_DEVICE; 366 dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
367 INIT_WORK(&dma->work, rsnd_dma_do_work); 367 INIT_WORK(&dma->work, rsnd_dma_do_work);
368 368
369 return 0; 369 return 0;
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 39d98af5ee05..067a89e9f25c 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -158,7 +158,7 @@ struct rsnd_dma {
158 struct sh_dmae_slave slave; 158 struct sh_dmae_slave slave;
159 struct work_struct work; 159 struct work_struct work;
160 struct dma_chan *chan; 160 struct dma_chan *chan;
161 enum dma_data_direction dir; 161 enum dma_transfer_direction dir;
162 162
163 int submit_loop; 163 int submit_loop;
164 int offset; /* it cares A/B plane */ 164 int offset; /* it cares A/B plane */