summaryrefslogtreecommitdiffstats
path: root/drivers/dma/mmp_pdma.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2014-01-07 21:36:24 +0530
committerVinod Koul <vinod.koul@intel.com>2014-01-07 21:36:24 +0530
commit0adcdeed6f87ac7230c9a0364ac785b8e70ad275 (patch)
tree77fd04c067b024887d801778227501762bdf2ddd /drivers/dma/mmp_pdma.c
parent4fce628f685945df4fd6fa1cab6f7eb397dc9267 (diff)
parent8010dad55a0ab0e829f3733854e5235eef4e2734 (diff)
downloadlinux-0-day-0adcdeed6f87ac7230c9a0364ac785b8e70ad275.tar.gz
linux-0-day-0adcdeed6f87ac7230c9a0364ac785b8e70ad275.tar.xz
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 3f7712c4d3fa7..c1b7c3ac76762 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