diff options
author | Silviu-Mihai Popescu <silviupopescu1990@gmail.com> | 2013-03-11 11:58:57 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-13 06:35:59 -0400 |
commit | 77c641d3468a66377752ee9ae06e65dee41fe804 (patch) | |
tree | 7c4b23c0057e73eab2b704f4c8b5e14d9998a34a /sound/soc/omap | |
parent | e37e04307c2921ee83b192cbeb65d21897d0c6e8 (diff) |
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')
-rw-r--r-- | sound/soc/omap/omap-dmic.c | 9 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcpdm.c | 8 |
2 files changed, 6 insertions, 11 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) | |||
493 | goto err_put_clk; | 493 | goto err_put_clk; |
494 | } | 494 | } |
495 | 495 | ||
496 | dmic->io_base = devm_request_and_ioremap(&pdev->dev, res); | 496 | dmic->io_base = devm_ioremap_resource(&pdev->dev, res); |
497 | if (!dmic->io_base) { | 497 | if (IS_ERR(dmic->io_base)) |
498 | dev_err(&pdev->dev, "cannot remap\n"); | 498 | return PTR_ERR(dmic->io_base); |
499 | ret = -ENOMEM; | ||
500 | goto err_put_clk; | ||
501 | } | ||
502 | 499 | ||
503 | ret = snd_soc_register_dai(&pdev->dev, &omap_dmic_dai); | 500 | ret = snd_soc_register_dai(&pdev->dev, &omap_dmic_dai); |
504 | if (ret) | 501 | if (ret) |
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index 079f277cdba4..ddfcc1834ff0 100644 --- a/sound/soc/omap/omap-mcpdm.c +++ b/sound/soc/omap/omap-mcpdm.c | |||
@@ -464,11 +464,9 @@ static int asoc_mcpdm_probe(struct platform_device *pdev) | |||
464 | if (res == NULL) | 464 | if (res == NULL) |
465 | return -ENOMEM; | 465 | return -ENOMEM; |
466 | 466 | ||
467 | mcpdm->io_base = devm_request_and_ioremap(&pdev->dev, res); | 467 | mcpdm->io_base = devm_ioremap_resource(&pdev->dev, res); |
468 | if (!mcpdm->io_base) { | 468 | if (IS_ERR(mcpdm->io_base)) |
469 | dev_err(&pdev->dev, "cannot remap\n"); | 469 | return PTR_ERR(mcpdm->io_base); |
470 | return -ENOMEM; | ||
471 | } | ||
472 | 470 | ||
473 | mcpdm->irq = platform_get_irq(pdev, 0); | 471 | mcpdm->irq = platform_get_irq(pdev, 0); |
474 | if (mcpdm->irq < 0) | 472 | if (mcpdm->irq < 0) |