diff options
-rw-r--r-- | drivers/dma/pl330.c | 10 |
1 files changed, 10 insertions, 0 deletions
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) | |||
2995 | pi->pcfg.data_bus_width / 8, pi->pcfg.num_chan, | 2995 | pi->pcfg.data_bus_width / 8, pi->pcfg.num_chan, |
2996 | pi->pcfg.num_peri, pi->pcfg.num_events); | 2996 | pi->pcfg.num_peri, pi->pcfg.num_events); |
2997 | 2997 | ||
2998 | ret = of_dma_controller_register(adev->dev.of_node, | ||
2999 | of_dma_pl330_xlate, pdmac); | ||
3000 | if (ret) { | ||
3001 | dev_err(&adev->dev, | ||
3002 | "unable to register DMA to the generic DT DMA helpers\n"); | ||
3003 | goto probe_err2; | ||
3004 | } | ||
3005 | |||
2998 | return 0; | 3006 | return 0; |
2999 | 3007 | ||
3000 | probe_err2: | 3008 | probe_err2: |
@@ -3015,6 +3023,8 @@ static int __devexit pl330_remove(struct amba_device *adev) | |||
3015 | if (!pdmac) | 3023 | if (!pdmac) |
3016 | return 0; | 3024 | return 0; |
3017 | 3025 | ||
3026 | of_dma_controller_free(adev->dev.of_node); | ||
3027 | |||
3018 | amba_set_drvdata(adev, NULL); | 3028 | amba_set_drvdata(adev, NULL); |
3019 | 3029 | ||
3020 | /* Idle the DMAC */ | 3030 | /* Idle the DMAC */ |