Commit 4f224c612438e0c2067594636c6998ce5048d228
Committed by
Mark Brown
1 parent
ddd17531ad
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
ASoC: omap-dmic: Clean up with devm_request_and_ioremap
Clean up dmic code with devm_request_and_ioremap function. Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Showing 1 changed file with 2 additions and 9 deletions Side-by-side Diff
sound/soc/omap/omap-dmic.c
... | ... | @@ -493,16 +493,9 @@ |
493 | 493 | goto err_put_clk; |
494 | 494 | } |
495 | 495 | |
496 | - if (!devm_request_mem_region(&pdev->dev, res->start, | |
497 | - resource_size(res), pdev->name)) { | |
498 | - dev_err(dmic->dev, "memory region already claimed\n"); | |
499 | - ret = -ENODEV; | |
500 | - goto err_put_clk; | |
501 | - } | |
502 | - | |
503 | - dmic->io_base = devm_ioremap(&pdev->dev, res->start, | |
504 | - resource_size(res)); | |
496 | + dmic->io_base = devm_request_and_ioremap(&pdev->dev, res); | |
505 | 497 | if (!dmic->io_base) { |
498 | + dev_err(&pdev->dev, "cannot remap\n"); | |
506 | 499 | ret = -ENOMEM; |
507 | 500 | goto err_put_clk; |
508 | 501 | } |