diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2013-06-17 12:40:57 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-17 18:19:58 +0200 |
commit | fc09cfbe3e3535897456c12f37fa83024bdab92d (patch) | |
tree | 2134e5020c3dd04fb6f87a1d6ecdfead6da34bba /sound/soc/spear | |
parent | ASoC: spear: Normalise module names (diff) | |
download | linux-fc09cfbe3e3535897456c12f37fa83024bdab92d.tar.xz linux-fc09cfbe3e3535897456c12f37fa83024bdab92d.zip |
ASoC: spear: Convert to use devm_ioremap_resource
Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().
devm_request_mem_region is called in devm_ioremap_resource(). Hence that
part can also be removed.
Since devm_ioremap_resource prints error message on failure, there is
no need to print an explicit warning message.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: alsa-devel@alsa-project.org
CC: Liam Girdwood <lgirdwood@gmail.com>
CC: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/spear')
-rw-r--r-- | sound/soc/spear/spdif_out.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c index a4a874820ab1..2fdf68c98d22 100644 --- a/sound/soc/spear/spdif_out.c +++ b/sound/soc/spear/spdif_out.c @@ -282,27 +282,16 @@ static int spdif_out_probe(struct platform_device *pdev) struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -EINVAL; - - if (!devm_request_mem_region(&pdev->dev, res->start, - resource_size(res), pdev->name)) { - dev_warn(&pdev->dev, "Failed to get memory resourse\n"); - return -ENOENT; - } - host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); if (!host) { dev_warn(&pdev->dev, "kzalloc fail\n"); return -ENOMEM; } - host->io_base = devm_request_and_ioremap(&pdev->dev, res); - if (!host->io_base) { - dev_warn(&pdev->dev, "ioremap failed\n"); - return -ENOMEM; - } + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + host->io_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(host->io_base)) + return PTR_ERR(host->io_base); host->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(host->clk)) |