gpio: pmic-eic-sprd: remove unnecessary call to platform_set_drvdata()
authorAndrei Coardos <aboutphysycs@gmail.com>
Fri, 28 Jul 2023 18:08:33 +0000 (21:08 +0300)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 1 Aug 2023 19:25:30 +0000 (21:25 +0200)
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 <alex@shruggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-pmic-eic-sprd.c

index dabb0da3bd331fc2a5ac3b329402fb972ca65984..2b9b7be9b8fdd892cae6a82e071795fef3d49d9e 100644 (file)
@@ -363,7 +363,6 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)
                return ret;
        }
 
-       platform_set_drvdata(pdev, pmic_eic);
        return 0;
 }