From: Padmavathi Venna Date: Thu, 14 Feb 2013 03:40:07 +0000 (+0530) Subject: DMA: PL330: Register the DMA controller with the generic DMA helpers X-Git-Tag: firefly_0821_release~3680^2~965^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=421da89aadd1b24f4a3bc1d60c9de9825ec2debc;p=firefly-linux-kernel-4.4.55.git DMA: PL330: Register the DMA controller with the generic DMA helpers This patch registers the pl330 dma controller driver with the generic device tree dma helper functions. Signed-off-by: Padmavathi Venna Acked-by: Arnd Bergmann Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index f5d47e617df2..fc9c80017378 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2995,6 +2995,14 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) pi->pcfg.data_bus_width / 8, pi->pcfg.num_chan, pi->pcfg.num_peri, pi->pcfg.num_events); + ret = of_dma_controller_register(adev->dev.of_node, + of_dma_pl330_xlate, pdmac); + if (ret) { + dev_err(&adev->dev, + "unable to register DMA to the generic DT DMA helpers\n"); + goto probe_err2; + } + return 0; probe_err2: @@ -3015,6 +3023,8 @@ static int __devexit pl330_remove(struct amba_device *adev) if (!pdmac) return 0; + of_dma_controller_free(adev->dev.of_node); + amba_set_drvdata(adev, NULL); /* Idle the DMAC */