From: Sachin Kamat Date: Mon, 4 Mar 2013 08:15:19 +0000 (-0300) Subject: [media] soc_camera/pxa_camera: Convert to devm_ioremap_resource() X-Git-Tag: v3.10-rc1~136^2~394 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8efdb13543909af277a93bab17730e92b552b7c9;p=platform%2Fkernel%2Flinux-stable.git [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 Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- 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 #include #include +#include #include #include #include @@ -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;