Skip to contentSkip to conversation

reset: lantiq: use devm_reset_controller_register()

PATCH Applied Yang Yingliang 2 participants 2 messages May 17, 2021 – Jun 7, 2021 Reset controller framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: lantiq: use devm_reset_controller_register()

Use devm_reset_controller_register() for the reset controller registration.

---
 drivers/reset/reset-lantiq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/reset/reset-lantiq.c +1 -1
index ac41d093de13..b936cfe85641 100644
@@ -186,7 +186,7 @@ static int lantiq_rcu_reset_probe(struct platform_device *pdev)
 	priv->rcdev.of_xlate = lantiq_rcu_reset_xlate;
 	priv->rcdev.of_reset_n_cells = 2;
 
-	return reset_controller_register(&priv->rcdev);
+	return devm_reset_controller_register(&pdev->dev, &priv->rcdev);
 }
 
 static const struct of_device_id lantiq_rcu_reset_dt_ids[] = {
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 13 lines · Yang Yingliang

Use devm_reset_controller_register() for the reset controller registration.

---
 drivers/reset/reset-lantiq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/reset/reset-lantiq.c +0 -0
index ac41d093de13..b936cfe85641 100644

drivers/reset/reset-lantiq.c static int lantiq_rcu_reset_probe(struct platform_device *pdev) · line 192

Quoted 8 lines
drivers/reset/reset-lantiq.c +1 -1
@@ -186,7 +186,7 @@ static int lantiq_rcu_reset_probe(struct platform_device *pdev)
 	priv->rcdev.of_xlate = lantiq_rcu_reset_xlate;
 	priv->rcdev.of_reset_n_cells = 2;
 
-	return reset_controller_register(&priv->rcdev);
+	return devm_reset_controller_register(&pdev->dev, &priv->rcdev);
 }
 
 static const struct of_device_id lantiq_rcu_reset_dt_ids[] = {

Thank you, applied to reset/next.

regards
Philipp