diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-04 08:15:19 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 17:34:35 (GMT) |
commit | 8efdb13543909af277a93bab17730e92b552b7c9 (patch) | |
tree | d81454c843a9b0c78f73773dff5753737b439ead /drivers/media/platform | |
parent | 2e2d612d80c1cb829769d413a8e8bf64f64197f8 (diff) | |
download | linux-fsl-qoriq-8efdb13543909af277a93bab17730e92b552b7c9.tar.xz |
[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: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/soc_camera/pxa_camera.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c index 395e2e0..42abbce 100644 --- a/drivers/media/platform/soc_camera/pxa_camera.c +++ b/drivers/media/platform/soc_camera/pxa_camera.c @@ -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; |