Skip to content

Commit 2de346a

Browse files
Zhang Zekunmathieupoirier
authored andcommitted
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: Zhang Zekun <zhangzekun11@huawei.com> Link: https://lore.kernel.org/r/20240906113405.92782-3-zhangzekun11@huawei.com [Fixed patch title] Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent b472e75 commit 2de346a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/remoteproc/da8xx_remoteproc.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,6 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
239239
struct da8xx_rproc *drproc;
240240
struct rproc *rproc;
241241
struct irq_data *irq_data;
242-
struct resource *bootreg_res;
243-
struct resource *chipsig_res;
244242
struct clk *dsp_clk;
245243
struct reset_control *dsp_reset;
246244
void __iomem *chipsig;
@@ -258,15 +256,11 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
258256
return -EINVAL;
259257
}
260258

261-
bootreg_res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
262-
"host1cfg");
263-
bootreg = devm_ioremap_resource(dev, bootreg_res);
259+
bootreg = devm_platform_ioremap_resource_byname(pdev, "host1cfg");
264260
if (IS_ERR(bootreg))
265261
return PTR_ERR(bootreg);
266262

267-
chipsig_res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
268-
"chipsig");
269-
chipsig = devm_ioremap_resource(dev, chipsig_res);
263+
chipsig = devm_platform_ioremap_resource_byname(pdev, "chipsig");
270264
if (IS_ERR(chipsig))
271265
return PTR_ERR(chipsig);
272266

0 commit comments

Comments
 (0)