mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 08:14:35 +08:00
[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>
This commit is contained in:
parent
dad0e1ce04
commit
611cbbfefa
@ -1976,17 +1976,9 @@ static int coda_probe(struct platform_device *pdev)
|
|||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (devm_request_mem_region(&pdev->dev, res->start,
|
dev->regs_base = devm_ioremap_resource(&pdev->dev, res);
|
||||||
resource_size(res), CODA_NAME) == NULL) {
|
if (IS_ERR(dev->regs_base))
|
||||||
dev_err(&pdev->dev, "failed to request memory region\n");
|
return PTR_ERR(dev->regs_base);
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* IRQ */
|
/* IRQ */
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user