Commit fc8344e6 authored by Yang Yingliang's avatar Yang Yingliang Committed by Mark Brown

ASoC: tegra30: ahub: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210618024722.2618842-5-yangyingliang@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c29b6382
...@@ -550,8 +550,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev) ...@@ -550,8 +550,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)
goto err_unset_ahub; goto err_unset_ahub;
} }
res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); regs_apbif = devm_platform_get_and_ioremap_resource(pdev, 0, &res0);
regs_apbif = devm_ioremap_resource(&pdev->dev, res0);
if (IS_ERR(regs_apbif)) { if (IS_ERR(regs_apbif)) {
ret = PTR_ERR(regs_apbif); ret = PTR_ERR(regs_apbif);
goto err_unset_ahub; goto err_unset_ahub;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment