From: Philipp Zabel Date: Tue, 21 May 2013 07:19:27 +0000 (-0300) Subject: [media] coda: use devm_ioremap_resource X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=611cbbfefa2170a281981b67f2fa3f7d498cc518;p=openwrt%2Fstaging%2Fblogic.git [media] coda: use devm_ioremap_resource Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- 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);