summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/dma.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-02-20 11:28:32 +0100
committerMark Brown <broonie@kernel.org>2015-03-07 16:04:30 +0100
commitaaf4fce019ecd55a2d93b6111525deeef300f751 (patch)
tree43d84bb4ad196aead1b5b5e04b1535ed815c352e /sound/soc/sh/rcar/dma.c
parentASoC: rsnd: remove rsnd_dma::addr (diff)
downloadlinux-aaf4fce019ecd55a2d93b6111525deeef300f751.tar.xz
linux-aaf4fce019ecd55a2d93b6111525deeef300f751.zip
ASoC: rsnd: remove rsnd_dma::dir
DMAEngine direction can be calculated from rsnd_dai_stream, So, rsnd_dma::dir does not make sense now. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/dma.c')
-rw-r--r--sound/soc/sh/rcar/dma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index c407fd250d2a..3f1ea58ee144 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -87,12 +87,13 @@ static void rsnd_dmaen_start(struct rsnd_dma *dma)
struct snd_pcm_substream *substream = io->substream;
struct device *dev = rsnd_priv_to_dev(priv);
struct dma_async_tx_descriptor *desc;
+ int is_play = rsnd_io_is_play(io);
desc = dmaengine_prep_dma_cyclic(dma->chan,
substream->runtime->dma_addr,
snd_pcm_lib_buffer_bytes(substream),
snd_pcm_lib_period_bytes(substream),
- dma->dir,
+ is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM,
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
if (!desc) {
@@ -156,8 +157,6 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id,
if (ret < 0)
goto rsnd_dma_init_err;
- dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-
return 0;
rsnd_dma_init_err: