ASoC: psc-ac97: Use devm_ioremap_resource()
authorMark Brown <broonie@linaro.org>
Wed, 26 Jun 2013 10:09:55 +0000 (11:09 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 27 Jun 2013 08:43:50 +0000 (09:43 +0100)
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/au1x/psc-ac97.c

index 8f1862aa733311b35552079ace7a8fa314b4c3b6..f5a392169338d080ca3b6d9effbbf42c5d0d459b 100644 (file)
@@ -383,15 +383,9 @@ static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
        if (!iores)
                return -ENODEV;
 
-       if (!devm_request_mem_region(&pdev->dev, iores->start,
-                                    resource_size(iores),
-                                    pdev->name))
-               return -EBUSY;
-
-       wd->mmio = devm_ioremap(&pdev->dev, iores->start,
-                               resource_size(iores));
-       if (!wd->mmio)
-               return -EBUSY;
+       wd->mmio = devm_ioremap_resource(&pdev->dev, iores);
+       if (IS_ERR(wd->mmio))
+               return PTR_ERR(wd->mmio);
 
        dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
        if (!dmares)