Skip to contentSkip to conversation

gpio: bcm-kona: remove unneeded platform_set_drvdata() call

PATCH In review Andrei Coardos 2 participants 2 messages Jul 17, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: bcm-kona: remove unneeded platform_set_drvdata() call

The platform_set_drvdata() call was never used, ever since the driver was originally added.
It looks like this copy+paste left-over. Possibly the author copied from a driver that had this line, but also had a remove hook.

---
 drivers/gpio/gpio-bcm-kona.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpio/gpio-bcm-kona.c +0 -1
index 70770429ba48..2e50a07a43e6 100644
@@ -597,7 +597,6 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	kona_gpio->pdev = pdev;
-	platform_set_drvdata(pdev, kona_gpio);
 	chip->parent = dev;
 	chip->ngpio = kona_gpio->num_bank * GPIO_PER_BANK;
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 4 lines · Andrei Coardos

The platform_set_drvdata() call was never used, ever since the driver was originally added.
It looks like this copy+paste left-over. Possibly the author copied from a driver that had this line, but also had a remove hook.

Cool, I'll incorporate this into my series. I'll make it as v2 to avoid clashes with this one.

Signature · 2 lines
With Best Regards,
Andy Shevchenko