summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-06-26 12:18:39 +0100
committerMark Brown <broonie@linaro.org>2013-06-27 09:45:06 +0100
commit2def2516aad75d73e899ee952754a89774d5b935 (patch)
tree32f739d110c723396b0e27b0f6f3a08fddbf3e7f /sound
parentcfe68642cff7c121f38a088a795759fd3500122c (diff)
downloadlinux-2def2516aad75d73e899ee952754a89774d5b935.tar.gz
linux-2def2516aad75d73e899ee952754a89774d5b935.tar.xz
ASoC: tegra20-ac97: Convert to devm_ioremap_resource()
Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra20_ac97.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index d8c142dc93e4..9043626da6fa 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -341,18 +341,10 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
goto err_clk_put;
}
- memregion = devm_request_mem_region(&pdev->dev, mem->start,
- resource_size(mem), DRV_NAME);
- if (!memregion) {
- dev_err(&pdev->dev, "Memory region already claimed\n");
- ret = -EBUSY;
- goto err_clk_put;
- }
-
- regs = devm_ioremap(&pdev->dev, mem->start, resource_size(mem));
- if (!regs) {
- dev_err(&pdev->dev, "ioremap failed\n");
- ret = -ENOMEM;
+ regs = devm_ioremap_resource(&pdev->dev, mem);
+ if (IS_ERR(regs)) {
+ ret = PTR_ERR(regs);
+ dev_err(&pdev->dev, "ioremap failed: %d\n", ret);
goto err_clk_put;
}