summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-09-04 04:39:09 -0400
committerMark Brown <broonie@kernel.org>2019-09-04 08:48:50 -0400
commita813d0e8884e514e6e1b28ad3b22f7658d446b16 (patch)
tree5915a9d22aac2c450e3c93cee151eb4a146c06ba
parent2f302d476c960fdf8481399a46b8df92408d06e2 (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/20190904083909.18804-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/tegra/tegra30_ahub.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
index 952381260dc3..635eacbd28d4 100644
--- a/sound/soc/tegra/tegra30_ahub.c
+++ b/sound/soc/tegra/tegra30_ahub.c
@@ -511,7 +511,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)
511 const struct tegra30_ahub_soc_data *soc_data; 511 const struct tegra30_ahub_soc_data *soc_data;
512 struct reset_control *rst; 512 struct reset_control *rst;
513 int i; 513 int i;
514 struct resource *res0, *res1; 514 struct resource *res0;
515 void __iomem *regs_apbif, *regs_ahub; 515 void __iomem *regs_apbif, *regs_ahub;
516 int ret = 0; 516 int ret = 0;
517 517
@@ -587,8 +587,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)
587 } 587 }
588 regcache_cache_only(ahub->regmap_apbif, true); 588 regcache_cache_only(ahub->regmap_apbif, true);
589 589
590 res1 = platform_get_resource(pdev, IORESOURCE_MEM, 1); 590 regs_ahub = devm_platform_ioremap_resource(pdev, 1);
591 regs_ahub = devm_ioremap_resource(&pdev->dev, res1);
592 if (IS_ERR(regs_ahub)) 591 if (IS_ERR(regs_ahub))
593 return PTR_ERR(regs_ahub); 592 return PTR_ERR(regs_ahub);
594 593