aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-g2d
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 06:09:07 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-06 09:33:04 -0200
commitf23999eccb5f1b6ec858279670307b5b1abe887a (patch)
treecaf2bd0a716fbb3cfd3af1ea13b5efbf39a5886b /drivers/media/platform/s5p-g2d
parent[media] use IS_ENABLED() macro (diff)
downloadlinux-dev-f23999eccb5f1b6ec858279670307b5b1abe887a.tar.xz
linux-dev-f23999eccb5f1b6ec858279670307b5b1abe887a.zip
[media] media: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() 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: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-g2d')
-rw-r--r--drivers/media/platform/s5p-g2d/g2d.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
index 7e415297e174..aaaf276a5a6c 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -713,11 +713,9 @@ static int g2d_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dev->regs = devm_request_and_ioremap(&pdev->dev, res);
- if (dev->regs == NULL) {
- dev_err(&pdev->dev, "Failed to obtain io memory\n");
- return -ENOENT;
- }
+ dev->regs = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(dev->regs))
+ return PTR_ERR(dev->regs);
dev->clk = clk_get(&pdev->dev, "sclk_fimg2d");
if (IS_ERR(dev->clk)) {