diff options
author | Silviu-Mihai Popescu <silviupopescu1990@gmail.com> | 2013-03-11 19:58:57 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-13 14:35:59 +0400 |
commit | 77c641d3468a66377752ee9ae06e65dee41fe804 (patch) | |
tree | 7c4b23c0057e73eab2b704f4c8b5e14d9998a34a /sound/soc/omap/omap-dmic.c | |
parent | e37e04307c2921ee83b192cbeb65d21897d0c6e8 (diff) | |
download | linux-77c641d3468a66377752ee9ae06e65dee41fe804.tar.xz |
ASoC: omap: convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap/omap-dmic.c')
-rw-r--r-- | sound/soc/omap/omap-dmic.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c index 77e9e7e68edc..8ebaf117d81f 100644 --- a/sound/soc/omap/omap-dmic.c +++ b/sound/soc/omap/omap-dmic.c @@ -493,12 +493,9 @@ static int asoc_dmic_probe(struct platform_device *pdev) goto err_put_clk; } - 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; - } + dmic->io_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(dmic->io_base)) + return PTR_ERR(dmic->io_base); ret = snd_soc_register_dai(&pdev->dev, &omap_dmic_dai); if (ret) |