Skip to contentSkip to conversation

thermal: broadcom: brcstb_thermal: removed unneeded platform_set_drvdata()

PATCH Applied Andrei Coardos 4 participants 4 messages Aug 9, 2023 – Aug 16, 2023

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

PATCH 1/1 thermal: broadcom: brcstb_thermal: removed unneeded 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/thermal/broadcom/brcmstb_thermal.c | 1 -
 1 file changed, 1 deletion(-)
drivers/thermal/broadcom/brcmstb_thermal.c +0 -1
index 72d1dbe60b8f..2997c589ac7d 100644
@@ -334,7 +334,6 @@ static int brcmstb_thermal_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->tmon_base);
 
 	priv->dev = &pdev->dev;
-	platform_set_drvdata(pdev, priv);
 	of_ops = priv->temp_params->of_ops;
 
 	thermal = devm_thermal_of_zone_register(&pdev->dev, 0, priv,
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.

Quoted 20 lines
---
 drivers/thermal/broadcom/brcmstb_thermal.c | 1 -
 1 file changed, 1 deletion(-)
drivers/thermal/broadcom/brcmstb_thermal.c +0 -2
index 72d1dbe60b8f..2997c589ac7d 100644
@@ -334,7 +334,6 @@ static int brcmstb_thermal_probe(struct platform_device *pdev)
                return PTR_ERR(priv->tmon_base);
 
        priv->dev = &pdev->dev;
-       platform_set_drvdata(pdev, priv);
        of_ops = priv->temp_params->of_ops;
 
        thermal = devm_thermal_of_zone_register(&pdev->dev, 0, priv,
--

2.34.1

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Andrei Coardos
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.

Signature · 1 line
Florian
#3 lore raw
In reply to Andrei Coardos
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.

---

Applied, thanks

Signature · 11 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel