aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/sh/shdma-base.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-07-05 06:29:40 -0400
committerVinod Koul <vinod.koul@linux.intel.com>2012-07-20 01:53:44 -0400
commitecf90fbbdc66cde6f5fa25d88541112b9baac459 (patch)
treee2998d0c217b07816dec6b22e03885c9fb4731bd /drivers/dma/sh/shdma-base.c
parent1e7f07b5390b4bbf82fe017fcb46682dcf4ab1d0 (diff)
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 ff060d0da908..f75ebfa735c0 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)
76 container_of(tx, struct shdma_desc, async_tx), 76 container_of(tx, struct shdma_desc, async_tx),
77 *last = desc; 77 *last = desc;
78 struct shdma_chan *schan = to_shdma_chan(tx->chan); 78 struct shdma_chan *schan = to_shdma_chan(tx->chan);
79 struct shdma_slave *slave = tx->chan->private; 79 struct shdma_slave *slave = schan->slave;
80 dma_async_tx_callback callback = tx->callback; 80 dma_async_tx_callback callback = tx->callback;
81 dma_cookie_t cookie; 81 dma_cookie_t cookie;
82 bool power_up; 82 bool power_up;
@@ -208,6 +208,7 @@ static int shdma_alloc_chan_resources(struct dma_chan *chan)
208 goto edescalloc; 208 goto edescalloc;
209 } 209 }
210 schan->desc_num = NR_DESCS_PER_CHANNEL; 210 schan->desc_num = NR_DESCS_PER_CHANNEL;
211 schan->slave = slave;
211 212
212 for (i = 0; i < NR_DESCS_PER_CHANNEL; i++) { 213 for (i = 0; i < NR_DESCS_PER_CHANNEL; i++) {
213 desc = ops->embedded_desc(schan->desc, i); 214 desc = ops->embedded_desc(schan->desc, i);
@@ -365,9 +366,9 @@ static void shdma_free_chan_resources(struct dma_chan *chan)
365 if (!list_empty(&schan->ld_queue)) 366 if (!list_empty(&schan->ld_queue))
366 shdma_chan_ld_cleanup(schan, true); 367 shdma_chan_ld_cleanup(schan, true);
367 368
368 if (chan->private) { 369 if (schan->slave) {
369 /* The caller is holding dma_list_mutex */ 370 /* The caller is holding dma_list_mutex */
370 struct shdma_slave *slave = chan->private; 371 struct shdma_slave *slave = schan->slave;
371 clear_bit(slave->slave_id, shdma_slave_used); 372 clear_bit(slave->slave_id, shdma_slave_used);
372 chan->private = NULL; 373 chan->private = NULL;
373 } 374 }
@@ -558,7 +559,7 @@ static struct dma_async_tx_descriptor *shdma_prep_slave_sg(
558 struct shdma_chan *schan = to_shdma_chan(chan); 559 struct shdma_chan *schan = to_shdma_chan(chan);
559 struct shdma_dev *sdev = to_shdma_dev(schan->dma_chan.device); 560 struct shdma_dev *sdev = to_shdma_dev(schan->dma_chan.device);
560 const struct shdma_ops *ops = sdev->ops; 561 const struct shdma_ops *ops = sdev->ops;
561 struct shdma_slave *slave = chan->private; 562 struct shdma_slave *slave = schan->slave;
562 dma_addr_t slave_addr; 563 dma_addr_t slave_addr;
563 564
564 if (!chan) 565 if (!chan)