diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2013-08-19 07:20:38 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-09-02 08:07:07 -0400 |
commit | 4770ee44359ad454992d544cf14f8d330a93f5ca (patch) | |
tree | 81234a845b3db85effb3a2d653fbbea79ba0e6e4 /drivers/dma | |
parent | 2ec7e2e7b5f41a09264abc6dbcfd3fdc9a1edfd5 (diff) |
dma: replace devm_request_and_ioremap by devm_ioremap_resource
Use devm_ioremap_resource instead of devm_request_and_ioremap.
This was done using the semantic patch
scripts/coccinelle/api/devm_ioremap_resource.cocci
The relevant call to platform_get_resource was manually moved down to the
call to devm_ioremap_resource.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/sh/sudmac.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c index c49441753d99..8369c6f02dcc 100644 --- a/drivers/dma/sh/sudmac.c +++ b/drivers/dma/sh/sudmac.c | |||
@@ -345,9 +345,8 @@ static int sudmac_probe(struct platform_device *pdev) | |||
345 | if (!pdata) | 345 | if (!pdata) |
346 | return -ENODEV; | 346 | return -ENODEV; |
347 | 347 | ||
348 | chan = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
349 | irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 348 | irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
350 | if (!chan || !irq_res) | 349 | if (!irq_res) |
351 | return -ENODEV; | 350 | return -ENODEV; |
352 | 351 | ||
353 | err = -ENOMEM; | 352 | err = -ENOMEM; |
@@ -360,9 +359,10 @@ static int sudmac_probe(struct platform_device *pdev) | |||
360 | 359 | ||
361 | dma_dev = &su_dev->shdma_dev.dma_dev; | 360 | dma_dev = &su_dev->shdma_dev.dma_dev; |
362 | 361 | ||
363 | su_dev->chan_reg = devm_request_and_ioremap(&pdev->dev, chan); | 362 | chan = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
364 | if (!su_dev->chan_reg) | 363 | su_dev->chan_reg = devm_ioremap_resource(&pdev->dev, chan); |
365 | return err; | 364 | if (IS_ERR(su_dev->chan_reg)) |
365 | return PTR_ERR(su_dev->chan_reg); | ||
366 | 366 | ||
367 | dma_cap_set(DMA_SLAVE, dma_dev->cap_mask); | 367 | dma_cap_set(DMA_SLAVE, dma_dev->cap_mask); |
368 | 368 | ||