summaryrefslogtreecommitdiffstats
path: root/drivers/dma/mmp_pdma.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2014-01-07 17:06:24 +0100
committerVinod Koul <vinod.koul@intel.com>2014-01-07 17:06:24 +0100
commit0adcdeed6f87ac7230c9a0364ac785b8e70ad275 (patch)
tree77fd04c067b024887d801778227501762bdf2ddd /drivers/dma/mmp_pdma.c
parentMerge branch 'topic/defer_probe' into for-linus (diff)
parentdma: add dma_get_any_slave_channel(), for use in of_xlate() (diff)
downloadlinux-0adcdeed6f87ac7230c9a0364ac785b8e70ad275.tar.xz
linux-0adcdeed6f87ac7230c9a0364ac785b8e70ad275.zip
Merge branch 'topic/of' into for-linus
Conflicts: drivers/dma/mmp_pdma.c Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/mmp_pdma.c')
-rw-r--r--drivers/dma/mmp_pdma.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index 3f7712c4d3fa..c1b7c3ac7676 100644
--- a/drivers/dma/mmp_pdma.c
+++ b/drivers/dma/mmp_pdma.c
@@ -898,20 +898,11 @@ static struct dma_chan *mmp_pdma_dma_xlate(struct of_phandle_args *dma_spec,
struct of_dma *ofdma)
{
struct mmp_pdma_device *d = ofdma->of_dma_data;
- struct dma_chan *chan, *candidate;
+ struct dma_chan *chan;
+ struct mmp_pdma_chan *c;
-retry:
- candidate = NULL;
-
- /* walk the list of channels registered with the current instance and
- * find one that is currently unused */
- list_for_each_entry(chan, &d->device.channels, device_node)
- if (chan->client_count == 0) {
- candidate = chan;
- break;
- }
-
- if (!candidate)
+ chan = dma_get_any_slave_channel(&d->device);
+ if (!chan)
return NULL;
/* dma_get_slave_channel will return NULL if we lost a race between