Skip to contentSkip to conversation

power: reset: qcom-pon: removed unneeded call to platform_set_drvdata()

PATCH In review Andrei Coardos 3 participants 3 messages Aug 14, 2023 – Aug 15, 2023

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

PATCH 1/1 power: reset: qcom-pon: removed 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/power/reset/qcom-pon.c | 2 --
 1 file changed, 2 deletions(-)
drivers/power/reset/qcom-pon.c +0 -2
index 1344b361a475..34478d60e2c1 100644
@@ -80,8 +80,6 @@ static int pm8916_pon_probe(struct platform_device *pdev)
 		}
 	}
 
-	platform_set_drvdata(pdev, pon);
-
 	return devm_of_platform_populate(&pdev->dev);
 }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 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.

Regards,
Bjorn

Reviewed-by
#2 lore raw
Quoted 9 lines · Bjorn Andersson
Quoted 6 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.

Quoted 4 lines

Regards,
Bjorn