ASoC: axi-spdif: Use devm_ioremap_resource() instead of devm_request_and_ioremap()
authorFengguang Wu <fengguang.wu@intel.com>
Mon, 16 Dec 2013 12:07:24 +0000 (13:07 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 16 Dec 2013 20:45:43 +0000 (20:45 +0000)
devm_request_and_ioremap() has been deprecated in favour of
devm_ioremap_resource(). Fixes the following coccinelle warning:

sound/soc/adi/axi-spdif.c:194:8-32: ERROR: deprecated devm_request_and_ioremap() API used on line 194

Generated by: coccinelle/api/devm_ioremap_resource.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/adi/axi-spdif.c

index d5408d23b4380031007e27819f7dd606178f3354..8db7a9920695d108396692ffe6afd9138e98dc27 100644 (file)
@@ -191,9 +191,9 @@ static int axi_spdif_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, spdif);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!base)
-               return -EBUSY;
+       base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(base))
+               return PTR_ERR(base);
 
        spdif->regmap = devm_regmap_init_mmio(&pdev->dev, base,
                                            &axi_spdif_regmap_config);