Use devm_request_and_ioremap function which provides more consistent error
handling.

Signed-off-by: Alexandru Gheorghiu <gheorghiuan...@gmail.com>
---
 drivers/dma/txx9dmac.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c
index 913f55c..471f9f1 100644
--- a/drivers/dma/txx9dmac.c
+++ b/drivers/dma/txx9dmac.c
@@ -1217,11 +1217,7 @@ static int __init txx9dmac_probe(struct platform_device 
*pdev)
        if (!ddev)
                return -ENOMEM;
 
-       if (!devm_request_mem_region(&pdev->dev, io->start, resource_size(io),
-                                    dev_name(&pdev->dev)))
-               return -EBUSY;
-
-       ddev->regs = devm_ioremap(&pdev->dev, io->start, resource_size(io));
+       ddev->regs = devm_request_and_ioremap(&pdev->dev, io);
        if (!ddev->regs)
                return -ENOMEM;
        ddev->have_64bit_regs = pdata->have_64bit_regs;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to