]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
[media] soc_camera/pxa_camera: Convert to devm_ioremap_resource()
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 4 Mar 2013 08:15:19 +0000 (05:15 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Mar 2013 17:34:35 +0000 (14:34 -0300)
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/soc_camera/pxa_camera.c

index 395e2e043615a42070de16722d36e5d42f530bb6..42abbce650f7e8bc5b6b65fe002e6cc90d9523df 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
+#include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/interrupt.h>
@@ -1710,9 +1711,10 @@ static int pxa_camera_probe(struct platform_device *pdev)
        /*
         * Request the regions.
         */
-       base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!base)
-               return -ENOMEM;
+       base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(base))
+               return PTR_ERR(base);
+
        pcdev->irq = irq;
        pcdev->base = base;