summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2013-05-21 04:19:27 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-05-27 09:31:59 -0300
commit611cbbfefa2170a281981b67f2fa3f7d498cc518 (patch)
tree69f1f795aaafaa4d8c5ad9c7262f7daec46e39cc /drivers
parentdad0e1ce0468d12b50b5735635d9283842ea8de3 (diff)
downloadlinux-611cbbfefa2170a281981b67f2fa3f7d498cc518.tar.gz
linux-611cbbfefa2170a281981b67f2fa3f7d498cc518.tar.bz2
linux-611cbbfefa2170a281981b67f2fa3f7d498cc518.zip
[media] coda: use devm_ioremap_resource
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/coda.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index d64908a74000..421230732051 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -1976,17 +1976,9 @@ static int coda_probe(struct platform_device *pdev)
return -ENOENT;
}
- if (devm_request_mem_region(&pdev->dev, res->start,
- resource_size(res), CODA_NAME) == NULL) {
- dev_err(&pdev->dev, "failed to request memory region\n");
- return -ENOENT;
- }
- dev->regs_base = devm_ioremap(&pdev->dev, res->start,
- resource_size(res));
- if (!dev->regs_base) {
- dev_err(&pdev->dev, "failed to ioremap address region\n");
- return -ENOENT;
- }
+ dev->regs_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(dev->regs_base))
+ return PTR_ERR(dev->regs_base);
/* IRQ */
irq = platform_get_irq(pdev, 0);