summaryrefslogtreecommitdiff
path: root/drivers/dma/sh/shdma-base.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-07-05 10:29:40 (GMT)
committerVinod Koul <vinod.koul@linux.intel.com>2012-07-20 05:53:44 (GMT)
commitecf90fbbdc66cde6f5fa25d88541112b9baac459 (patch)
treee2998d0c217b07816dec6b22e03885c9fb4731bd /drivers/dma/sh/shdma-base.c
parent1e7f07b5390b4bbf82fe017fcb46682dcf4ab1d0 (diff)
downloadlinux-ecf90fbbdc66cde6f5fa25d88541112b9baac459.tar.xz
dmaengine: shdma: prepare to stop using struct dma_chan::private
Using struct dma_chan::private is deprecated. To update the shdma driver to stop using it we first have to eliminate internal runtime uses of it. After that we will also be able to stop using it for channel configuration. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/sh/shdma-base.c')
-rw-r--r--drivers/dma/sh/shdma-base.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
index ff060d0..f75ebfa 100644
--- a/drivers/dma/sh/shdma-base.c
+++ b/drivers/dma/sh/shdma-base.c
@@ -76,7 +76,7 @@ static dma_cookie_t shdma_tx_submit(struct dma_async_tx_descriptor *tx)
container_of(tx, struct shdma_desc, async_tx),
*last = desc;
struct shdma_chan *schan = to_shdma_chan(tx->chan);
- struct shdma_slave *slave = tx->chan->private;
+ struct shdma_slave *slave = schan->slave;
dma_async_tx_callback callback = tx->callback;
dma_cookie_t cookie;
bool power_up;
@@ -208,6 +208,7 @@ static int shdma_alloc_chan_resources(struct dma_chan *chan)
goto edescalloc;
}
schan->desc_num = NR_DESCS_PER_CHANNEL;
+ schan->slave = slave;
for (i = 0; i < NR_DESCS_PER_CHANNEL; i++) {
desc = ops->embedded_desc(schan->desc, i);
@@ -365,9 +366,9 @@ static void shdma_free_chan_resources(struct dma_chan *chan)
if (!list_empty(&schan->ld_queue))
shdma_chan_ld_cleanup(schan, true);
- if (chan->private) {
+ if (schan->slave) {
/* The caller is holding dma_list_mutex */
- struct shdma_slave *slave = chan->private;
+ struct shdma_slave *slave = schan->slave;
clear_bit(slave->slave_id, shdma_slave_used);
chan->private = NULL;
}
@@ -558,7 +559,7 @@ static struct dma_async_tx_descriptor *shdma_prep_slave_sg(
struct shdma_chan *schan = to_shdma_chan(chan);
struct shdma_dev *sdev = to_shdma_dev(schan->dma_chan.device);
const struct shdma_ops *ops = sdev->ops;
- struct shdma_slave *slave = chan->private;
+ struct shdma_slave *slave = schan->slave;
dma_addr_t slave_addr;
if (!chan)