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

Andrei Coardos posted 1 patch 2 years, 4 months ago
drivers/power/reset/qcom-pon.c | 2 --
1 file changed, 2 deletions(-)
[PATCH] power: reset: qcom-pon: removed unneeded call to platform_set_drvdata()
Posted by Andrei Coardos 2 years, 4 months ago
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.

Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
---
 drivers/power/reset/qcom-pon.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/power/reset/qcom-pon.c b/drivers/power/reset/qcom-pon.c
index 1344b361a475..34478d60e2c1 100644
--- a/drivers/power/reset/qcom-pon.c
+++ b/drivers/power/reset/qcom-pon.c
@@ -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);
 }
 
-- 
2.34.1
Re: [PATCH] power: reset: qcom-pon: removed unneeded call to platform_set_drvdata()
Posted by Bjorn Andersson 2 years, 4 months ago
On Mon, Aug 14, 2023 at 09:18:23PM +0300, Andrei Coardos wrote:
> 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.
> 
> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>

Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>

Regards,
Bjorn
Re: [PATCH] power: reset: qcom-pon: removed unneeded call to platform_set_drvdata()
Posted by Alexandru Ardelean 2 years, 4 months ago
On Mon, Aug 14, 2023 at 10:43 PM Bjorn Andersson
<quic_bjorande@quicinc.com> wrote:
>
> On Mon, Aug 14, 2023 at 09:18:23PM +0300, Andrei Coardos wrote:
> > 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.
> >
> > Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
>

Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>

> Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>
>
> Regards,
> Bjorn