diff mbox series

gpio: exar: remove unneeded platform_set_drvdata() call

Message ID 20230719093923.17265-1-aboutphysycs@gmail.com
State Accepted
Commit ba8a90e8cb8ca4db4e57be6b53aa8c364137b38c
Headers show
Series gpio: exar: remove unneeded platform_set_drvdata() call | expand

Commit Message

Andrei Coardos July 19, 2023, 9:39 a.m. UTC
The platform_set_drvdata() was needed when the driver had an explicit
remove function.
That function got removed a while back, so we don't need to keep a pointer
(on 'dev->driver_data') for the private data of the driver anymore.

Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
---
 drivers/gpio/gpio-exar.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Andy Shevchenko July 19, 2023, 3:30 p.m. UTC | #1
On Wed, Jul 19, 2023 at 12:39:23PM +0300, Andrei Coardos wrote:
> The platform_set_drvdata() was needed when the driver had an explicit
> remove function.
> That function got removed a while back, so we don't need to keep a pointer
> (on 'dev->driver_data') for the private data of the driver anymore.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Bartosz Golaszewski July 29, 2023, 2:05 p.m. UTC | #2
On Wed, Jul 19, 2023 at 11:41 AM Andrei Coardos <aboutphysycs@gmail.com> wrote:
>
> The platform_set_drvdata() was needed when the driver had an explicit
> remove function.
> That function got removed a while back, so we don't need to keep a pointer
> (on 'dev->driver_data') for the private data of the driver anymore.
>
> Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
> ---
>  drivers/gpio/gpio-exar.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c
> index df1bdaae441c..5170fe7599cd 100644
> --- a/drivers/gpio/gpio-exar.c
> +++ b/drivers/gpio/gpio-exar.c
> @@ -217,8 +217,6 @@ static int gpio_exar_probe(struct platform_device *pdev)
>         if (ret)
>                 return ret;
>
> -       platform_set_drvdata(pdev, exar_gpio);
> -
>         return 0;
>  }
>
> --
> 2.34.1
>

Applied, thanks!

Bart
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c
index df1bdaae441c..5170fe7599cd 100644
--- a/drivers/gpio/gpio-exar.c
+++ b/drivers/gpio/gpio-exar.c
@@ -217,8 +217,6 @@  static int gpio_exar_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	platform_set_drvdata(pdev, exar_gpio);
-
 	return 0;
 }