Skip to contentSkip to conversation

reset: lantiq: remove unneeded call to platform_set_drvdata()

PATCH Applied Andrei Coardos 2 participants 2 messages Aug 3, 2023 – Aug 8, 2023 Reset controller framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: lantiq: remove unneeded call to platform_set_drvdata()

This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file.

---
 drivers/reset/reset-lantiq.c | 1 -
 1 file changed, 1 deletion(-)
drivers/reset/reset-lantiq.c +0 -1
index 549ba45d8597..652a45890cb2 100644
@@ -173,7 +173,6 @@ static int lantiq_rcu_reset_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	priv->dev = &pdev->dev;
-	platform_set_drvdata(pdev, priv);
 
 	err = lantiq_rcu_reset_of_parse(pdev, priv);
 	if (err)
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Andrei Coardos

This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file.

Thank you, applied to reset/next.

regards
Philipp