Skip to contentSkip to conversation

remoteproc: stm32_rproc: Do not request reset by index

PATCH Applied Philipp Zabel 2 participants 2 messages Nov 6 – Nov 9

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: stm32_rproc: Do not request reset by index

There is no need to request a single reset by index.
Use devm_reset_control_get_exclusive() to request the first and only reset.

---
 drivers/remoteproc/stm32_rproc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/remoteproc/stm32_rproc.c +2 -2
index a47e040c6db8..1443a4013d6c 100644
@@ -696,8 +696,8 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev,
 
 	ddata->rst = devm_reset_control_get_optional(dev, "mcu_rst");
 	if (!ddata->rst) {
-		/* Try legacy fallback method: get it by index */
-		ddata->rst = devm_reset_control_get_by_index(dev, 0);
+		/* Try legacy fallback method: get the first reset */
+		ddata->rst = devm_reset_control_get_exclusive(dev, NULL);
 	}
 	if (IS_ERR(ddata->rst))
 		return dev_err_probe(dev, PTR_ERR(ddata->rst),

---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261106-reset-deindex-rproc-3c1aa2e9325f

Best regards,

Signature · 1 line
Philipp Zabel <[email protected]>
maintainer Applied
#1 lore raw
Quoted 8 lines · Philipp Zabel

There is no need to request a single reset by index.
Use devm_reset_control_get_exclusive() to request the first and only reset.

---
 drivers/remoteproc/stm32_rproc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied.

Thanks,
Mathieu

Quoted 25 lines
drivers/remoteproc/stm32_rproc.c +2 -3
index a47e040c6db8..1443a4013d6c 100644
@@ -696,8 +696,8 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev,
 
 	ddata->rst = devm_reset_control_get_optional(dev, "mcu_rst");
 	if (!ddata->rst) {
-		/* Try legacy fallback method: get it by index */
-		ddata->rst = devm_reset_control_get_by_index(dev, 0);
+		/* Try legacy fallback method: get the first reset */
+		ddata->rst = devm_reset_control_get_exclusive(dev, NULL);
 	}
 	if (IS_ERR(ddata->rst))
 		return dev_err_probe(dev, PTR_ERR(ddata->rst),
 
---

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261106-reset-deindex-rproc-3c1aa2e9325f

Best regards,

Signature · 1 line
Philipp Zabel <[email protected]>