aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-03-04 03:15:20 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 13:33:08 -0400
commit15a0934201780f7a95d9fa3b910e19bf89ab25d5 (patch)
tree28522f6c568fc9bb529081c3f590d61650a7af6b
parentbff7993936a1617f7502ddd2a09d37767fc8c929 (diff)
[media] soc_camera/sh_mobile_ceu_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. devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. 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>
-rw-r--r--drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
index 973e72b24fa8..d7294efc3199 100644
--- a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
+++ b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
@@ -20,6 +20,7 @@
20#include <linux/completion.h> 20#include <linux/completion.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/dma-mapping.h> 22#include <linux/dma-mapping.h>
23#include <linux/err.h>
23#include <linux/errno.h> 24#include <linux/errno.h>
24#include <linux/fs.h> 25#include <linux/fs.h>
25#include <linux/interrupt.h> 26#include <linux/interrupt.h>
@@ -2111,11 +2112,9 @@ static int sh_mobile_ceu_probe(struct platform_device *pdev)
2111 pcdev->max_width = pcdev->pdata->max_width ? : 2560; 2112 pcdev->max_width = pcdev->pdata->max_width ? : 2560;
2112 pcdev->max_height = pcdev->pdata->max_height ? : 1920; 2113 pcdev->max_height = pcdev->pdata->max_height ? : 1920;
2113 2114
2114 base = devm_request_and_ioremap(&pdev->dev, res); 2115 base = devm_ioremap_resource(&pdev->dev, res);
2115 if (!base) { 2116 if (IS_ERR(base))
2116 dev_err(&pdev->dev, "Unable to ioremap CEU registers.\n"); 2117 return PTR_ERR(base);
2117 return -ENXIO;
2118 }
2119 2118
2120 pcdev->irq = irq; 2119 pcdev->irq = irq;
2121 pcdev->base = base; 2120 pcdev->base = base;