[PATCH 4/4] DMA: PL330: Modify pl330 filter based on new generic dma dt bindings.

Padmavathi Venna padma.v at samsung.com
Fri Jan 18 22:33:44 EST 2013


This patch modify the filter function to filter the required channel
based on new filter params.

Signed-off-by: Padmavathi Venna <padma.v at samsung.com>
---
 drivers/dma/pl330.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index b80ef97..a773ea7 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2378,15 +2378,8 @@ bool pl330_filter(struct dma_chan *chan, void *param)
 
 #ifdef CONFIG_OF
 	if (chan->device->dev->of_node) {
-		const __be32 *prop_value;
-		phandle phandle;
-		struct device_node *node;
-
-		prop_value = ((struct property *)param)->value;
-		phandle = be32_to_cpup(prop_value++);
-		node = of_find_node_by_phandle(phandle);
-		return ((chan->private == node) &&
-				(chan->chan_id == be32_to_cpup(prop_value)));
+		struct of_phandle_args *dma_spec = param;
+		return ((chan->private == dma_spec->np) && (chan->chan_id == dma_spec->args[0]));
 	}
 #endif
 
-- 
1.7.4.4



More information about the devicetree-discuss mailing list