Commit 2de346a4 authored by Zhang Zekun's avatar Zhang Zekun Committed by Mathieu Poirier

remoteproc: da8xx: 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-3-zhangzekun11@huawei.com
[Fixed patch title]
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent b472e756
...@@ -239,8 +239,6 @@ static int da8xx_rproc_probe(struct platform_device *pdev) ...@@ -239,8 +239,6 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
struct da8xx_rproc *drproc; struct da8xx_rproc *drproc;
struct rproc *rproc; struct rproc *rproc;
struct irq_data *irq_data; struct irq_data *irq_data;
struct resource *bootreg_res;
struct resource *chipsig_res;
struct clk *dsp_clk; struct clk *dsp_clk;
struct reset_control *dsp_reset; struct reset_control *dsp_reset;
void __iomem *chipsig; void __iomem *chipsig;
...@@ -258,15 +256,11 @@ static int da8xx_rproc_probe(struct platform_device *pdev) ...@@ -258,15 +256,11 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
} }
bootreg_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, bootreg = devm_platform_ioremap_resource_byname(pdev, "host1cfg");
"host1cfg");
bootreg = devm_ioremap_resource(dev, bootreg_res);
if (IS_ERR(bootreg)) if (IS_ERR(bootreg))
return PTR_ERR(bootreg); return PTR_ERR(bootreg);
chipsig_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, chipsig = devm_platform_ioremap_resource_byname(pdev, "chipsig");
"chipsig");
chipsig = devm_ioremap_resource(dev, chipsig_res);
if (IS_ERR(chipsig)) if (IS_ERR(chipsig))
return PTR_ERR(chipsig); return PTR_ERR(chipsig);
......
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