diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2019-09-22 10:37:31 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2019-10-14 13:21:20 +0530 |
commit | fbd1d637f6d1a5b0d2b487299111b06fb0b3c3fd (patch) | |
tree | f6e7937a40f974fda36fa1c92e3b1ea382239634 /drivers/dma/at_xdmac.c | |
parent | fcf8adb787073ba6c673c1bb9900a059c7f6676f (diff) | |
download | linux-fbd1d637f6d1a5b0d2b487299111b06fb0b3c3fd.tar.bz2 |
dmaengine: at_xdmac: Use devm_platform_ioremap_resource() in at_xdmac_probe()
Simplify this function implementation by using a known wrapper function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Link: https://lore.kernel.org/r/377247f3-b53a-a9d9-66c7-4b8515de3809@web.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/at_xdmac.c')
-rw-r--r-- | drivers/dma/at_xdmac.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index b58ac720d9a1..f71c9f77d405 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -1957,21 +1957,16 @@ static int atmel_xdmac_resume(struct device *dev) static int at_xdmac_probe(struct platform_device *pdev) { - struct resource *res; struct at_xdmac *atxdmac; int irq, size, nr_channels, i, ret; void __iomem *base; u32 reg; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -EINVAL; - irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); |