Commit 38a0e38b authored by Zhang Zekun's avatar Zhang Zekun Committed by Mathieu Poirier

remoteporc: ingenic: Use devm_platform_ioremap_resource_byname()

platform_get_resource_byname() and devm_ioremap_resource() can be
replaced by devm_platform_ioremap_resource_byname(), which can
simplify the code logic a bit, No functional change here.
Signed-off-by: default avatarZhang Zekun <zhangzekun11@huawei.com>
Link: https://lore.kernel.org/r/20240906113405.92782-4-zhangzekun11@huawei.com
[Fixed patch title]
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent 2de346a4
...@@ -183,8 +183,7 @@ static int ingenic_rproc_probe(struct platform_device *pdev) ...@@ -183,8 +183,7 @@ static int ingenic_rproc_probe(struct platform_device *pdev)
vpu->dev = &pdev->dev; vpu->dev = &pdev->dev;
platform_set_drvdata(pdev, vpu); platform_set_drvdata(pdev, vpu);
mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aux"); vpu->aux_base = devm_platform_ioremap_resource_byname(pdev, "aux");
vpu->aux_base = devm_ioremap_resource(dev, mem);
if (IS_ERR(vpu->aux_base)) { if (IS_ERR(vpu->aux_base)) {
dev_err(dev, "Failed to ioremap\n"); dev_err(dev, "Failed to ioremap\n");
return PTR_ERR(vpu->aux_base); return PTR_ERR(vpu->aux_base);
......
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