]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: omap: convert to devm_ioremap_resource()
authorSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Mon, 11 Mar 2013 15:58:57 +0000 (17:58 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 13 Mar 2013 10:35:59 +0000 (10:35 +0000)
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>
sound/soc/omap/omap-dmic.c
sound/soc/omap/omap-mcpdm.c

index 77e9e7e68edcbdbaae6e6e512f4afd2ff2a0cea6..8ebaf117d81f084307b9a3221da800ee44c67f43 100644 (file)
@@ -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)
index 079f277cdba41c53cbfedc132b6dce687e66123a..ddfcc1834ff0204985616d22ecddf177a4a436bb 100644 (file)
@@ -464,11 +464,9 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
        if (res == NULL)
                return -ENOMEM;
 
-       mcpdm->io_base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!mcpdm->io_base) {
-               dev_err(&pdev->dev, "cannot remap\n");
-               return -ENOMEM;
-       }
+       mcpdm->io_base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(mcpdm->io_base))
+               return PTR_ERR(mcpdm->io_base);
 
        mcpdm->irq = platform_get_irq(pdev, 0);
        if (mcpdm->irq < 0)