diff options
author | Michal Simek <michal.simek@xilinx.com> | 2013-09-04 10:40:17 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-10-06 22:11:38 -0400 |
commit | 173e838c31fded558dd27293ae6253a495696ca0 (patch) | |
tree | b6c83c198989c3f8420b8fa0b6bf3ee54ddb6624 /drivers/dma/pl330.c | |
parent | d0e639c9e06d44e713170031fe05fb60ebe680af (diff) |
dma: pl330: Simplify irq allocation
Use devm_request_irq function.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r-- | drivers/dma/pl330.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index a562d24d20bf..58623dc474d1 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -2923,7 +2923,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) | |||
2923 | amba_set_drvdata(adev, pdmac); | 2923 | amba_set_drvdata(adev, pdmac); |
2924 | 2924 | ||
2925 | irq = adev->irq[0]; | 2925 | irq = adev->irq[0]; |
2926 | ret = request_irq(irq, pl330_irq_handler, 0, | 2926 | ret = devm_request_irq(&adev->dev, irq, pl330_irq_handler, 0, |
2927 | dev_name(&adev->dev), pi); | 2927 | dev_name(&adev->dev), pi); |
2928 | if (ret) | 2928 | if (ret) |
2929 | return ret; | 2929 | return ret; |
@@ -2931,7 +2931,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) | |||
2931 | pi->pcfg.periph_id = adev->periphid; | 2931 | pi->pcfg.periph_id = adev->periphid; |
2932 | ret = pl330_add(pi); | 2932 | ret = pl330_add(pi); |
2933 | if (ret) | 2933 | if (ret) |
2934 | goto probe_err1; | 2934 | return ret; |
2935 | 2935 | ||
2936 | INIT_LIST_HEAD(&pdmac->desc_pool); | 2936 | INIT_LIST_HEAD(&pdmac->desc_pool); |
2937 | spin_lock_init(&pdmac->pool_lock); | 2937 | spin_lock_init(&pdmac->pool_lock); |
@@ -3044,8 +3044,6 @@ probe_err3: | |||
3044 | } | 3044 | } |
3045 | probe_err2: | 3045 | probe_err2: |
3046 | pl330_del(pi); | 3046 | pl330_del(pi); |
3047 | probe_err1: | ||
3048 | free_irq(irq, pi); | ||
3049 | 3047 | ||
3050 | return ret; | 3048 | return ret; |
3051 | } | 3049 | } |
@@ -3055,7 +3053,6 @@ static int pl330_remove(struct amba_device *adev) | |||
3055 | struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev); | 3053 | struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev); |
3056 | struct dma_pl330_chan *pch, *_p; | 3054 | struct dma_pl330_chan *pch, *_p; |
3057 | struct pl330_info *pi; | 3055 | struct pl330_info *pi; |
3058 | int irq; | ||
3059 | 3056 | ||
3060 | if (!pdmac) | 3057 | if (!pdmac) |
3061 | return 0; | 3058 | return 0; |
@@ -3082,9 +3079,6 @@ static int pl330_remove(struct amba_device *adev) | |||
3082 | 3079 | ||
3083 | pl330_del(pi); | 3080 | pl330_del(pi); |
3084 | 3081 | ||
3085 | irq = adev->irq[0]; | ||
3086 | free_irq(irq, pi); | ||
3087 | |||
3088 | return 0; | 3082 | return 0; |
3089 | } | 3083 | } |
3090 | 3084 | ||