summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-07-27 11:07:06 -0400
committerMark Brown <broonie@kernel.org>2019-07-31 07:03:41 -0400
commit7d22808641cdea50baeae636acf5d592a7aa1239 (patch)
tree7675066ed305ab27baeeddf1e084a81c012d7f6b
parent21cc4ea85879c1b424fb01caa6e481c14286f7f0 (diff)
ASoC: tegra: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190727150738.54764-3-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/tegra/tegra30_i2s.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index ac6983c6bd72..e6d548fa980b 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -368,7 +368,6 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
368 struct tegra30_i2s *i2s; 368 struct tegra30_i2s *i2s;
369 const struct of_device_id *match; 369 const struct of_device_id *match;
370 u32 cif_ids[2]; 370 u32 cif_ids[2];
371 struct resource *mem;
372 void __iomem *regs; 371 void __iomem *regs;
373 int ret; 372 int ret;
374 373
@@ -406,8 +405,7 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
406 goto err; 405 goto err;
407 } 406 }
408 407
409 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 408 regs = devm_platform_ioremap_resource(pdev, 0);
410 regs = devm_ioremap_resource(&pdev->dev, mem);
411 if (IS_ERR(regs)) { 409 if (IS_ERR(regs)) {
412 ret = PTR_ERR(regs); 410 ret = PTR_ERR(regs);
413 goto err_clk_put; 411 goto err_clk_put;