Commit 4f224c61 authored by Sebastien Guiriec's avatar Sebastien Guiriec Committed by Mark Brown

ASoC: omap-dmic: Clean up with devm_request_and_ioremap

Clean up dmic code with devm_request_and_ioremap function.
Signed-off-by: default avatarSebastien Guiriec <s-guiriec@ti.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent ddd17531
...@@ -493,16 +493,9 @@ static int asoc_dmic_probe(struct platform_device *pdev) ...@@ -493,16 +493,9 @@ static int asoc_dmic_probe(struct platform_device *pdev)
goto err_put_clk; goto err_put_clk;
} }
if (!devm_request_mem_region(&pdev->dev, res->start, dmic->io_base = devm_request_and_ioremap(&pdev->dev, res);
resource_size(res), pdev->name)) {
dev_err(dmic->dev, "memory region already claimed\n");
ret = -ENODEV;
goto err_put_clk;
}
dmic->io_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
if (!dmic->io_base) { if (!dmic->io_base) {
dev_err(&pdev->dev, "cannot remap\n");
ret = -ENOMEM; ret = -ENOMEM;
goto err_put_clk; goto err_put_clk;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment