summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorSebastien Guiriec <s-guiriec@ti.com>2013-02-13 08:22:07 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-04 04:17:28 +0100
commit4f224c612438e0c2067594636c6998ce5048d228 (patch)
treed060428bdc11d463125e51c1372375b996b7dead /sound/soc/omap
parentASoC: omap-mcpdm: Clean up with devm_* function (diff)
downloadlinux-4f224c612438e0c2067594636c6998ce5048d228.tar.xz
linux-4f224c612438e0c2067594636c6998ce5048d228.zip
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>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/omap-dmic.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index ba49ccd9eed9..77e9e7e68edc 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -493,16 +493,9 @@ static int asoc_dmic_probe(struct platform_device *pdev)
goto err_put_clk;
}
- if (!devm_request_mem_region(&pdev->dev, res->start,
- 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));
+ dmic->io_base = devm_request_and_ioremap(&pdev->dev, res);
if (!dmic->io_base) {
+ dev_err(&pdev->dev, "cannot remap\n");
ret = -ENOMEM;
goto err_put_clk;
}