From: Sachin Kamat Date: Mon, 4 Mar 2013 08:15:18 +0000 (-0300) Subject: [media] sh_veu.c: Convert to devm_ioremap_resource() X-Git-Tag: v4.0~1536^2~2415 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2b4dc1a0fc8f52e06025497ce9bb252ff51f15f;p=platform%2Fkernel%2Flinux-amlogic.git [media] sh_veu.c: 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/sh_veu.c b/drivers/media/platform/sh_veu.c index cb54c69..362d88e 100644 --- a/drivers/media/platform/sh_veu.c +++ b/drivers/media/platform/sh_veu.c @@ -10,6 +10,7 @@ * published by the Free Software Foundation */ +#include #include #include #include @@ -1164,9 +1165,9 @@ static int sh_veu_probe(struct platform_device *pdev) veu->is_2h = resource_size(reg_res) == 0x22c; - veu->base = devm_request_and_ioremap(&pdev->dev, reg_res); - if (!veu->base) - return -ENOMEM; + veu->base = devm_ioremap_resource(&pdev->dev, reg_res); + if (IS_ERR(veu->base)) + return PTR_ERR(veu->base); ret = devm_request_threaded_irq(&pdev->dev, irq, sh_veu_isr, sh_veu_bh, 0, "veu", veu);