Commit 8efdb135 authored by Sachin Kamat's avatar Sachin Kamat Committed by Mauro Carvalho Chehab

[media] soc_camera/pxa_camera: Convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2e2d612d
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -1710,9 +1711,10 @@ static int pxa_camera_probe(struct platform_device *pdev) ...@@ -1710,9 +1711,10 @@ static int pxa_camera_probe(struct platform_device *pdev)
/* /*
* Request the regions. * Request the regions.
*/ */
base = devm_request_and_ioremap(&pdev->dev, res); base = devm_ioremap_resource(&pdev->dev, res);
if (!base) if (IS_ERR(base))
return -ENOMEM; return PTR_ERR(base);
pcdev->irq = irq; pcdev->irq = irq;
pcdev->base = base; pcdev->base = base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment