gpio: pmic-eic-sprd: remove unnecessary call to platform_set_drvdata()
Subsystems (2)
PATCH 1/1 gpio: pmic-eic-sprd: remove unnecessary 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/gpio/gpio-pmic-eic-sprd.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpio/gpio-pmic-eic-sprd.c +0 -1
@@ -363,7 +363,6 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)return ret; } -platform_set_drvdata (pdev, pmic_eic);return 0 ; }
Signature · 1 line
2.34.1
Quoted 5 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 · 2 lines
With Best Regards, Andy Shevchenko
Bartosz Golaszewski
AppliedQuoted 25 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.Reviewed-by Alexandru Ardelean <[email protected]>Signed-off-by Andrei Coardos <[email protected]>--- drivers/gpio/gpio-pmic-eic-sprd.c | 1 - 1 file changed, 1 deletion(-)drivers/gpio/gpio-pmic-eic-sprd.c +0
-2@@ -363,7 +363,6 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)return ret; } -platform_set_drvdata (pdev, pmic_eic);return 0 ; } --
Quoted 2 lines
2.34.1
Applied, thanks!
Bartosz