From 7331205a9662a730799470fdd9ecbff0ea073606 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:00 +0100 Subject: dma: Convert to devm_ioremap_resource() Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding Cc: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/imx-dma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/dma/imx-dma.c') diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index dbf0e6f8de8a..84ae49101407 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -14,6 +14,7 @@ * http://www.opensource.org/licenses/gpl-license.html * http://www.gnu.org/copyleft/gpl.html */ +#include #include #include #include @@ -1011,9 +1012,9 @@ static int __init imxdma_probe(struct platform_device *pdev) imxdma->devtype = pdev->id_entry->driver_data; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - imxdma->base = devm_request_and_ioremap(&pdev->dev, res); - if (!imxdma->base) - return -EADDRNOTAVAIL; + imxdma->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(imxdma->base)) + return PTR_ERR(imxdma->base); irq = platform_get_irq(pdev, 0); if (irq < 0) -- cgit v1.2.3