Skip to contentSkip to conversation

gpio: exar: remove unneeded platform_set_drvdata() call

PATCH Applied Andrei Coardos 3 participants 3 messages Jul 19, 2023 – Jul 29, 2023 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: exar: remove unneeded platform_set_drvdata() call

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.

---
 drivers/gpio/gpio-exar.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-exar.c +0 -2
index df1bdaae441c..5170fe7599cd 100644
@@ -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;
 }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andrei Coardos

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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
In reply to Andrei Coardos
Quoted 26 lines · Andrei Coardos

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.

---
 drivers/gpio/gpio-exar.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-exar.c +0 -3
index df1bdaae441c..5170fe7599cd 100644
@@ -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;
 }
 
--
Quoted 2 lines

2.34.1

Applied, thanks!

Bart