Skip to contentSkip to conversation

gpio: tegra: Get rid of duplicate of_node assignment

PATCH In review Andy Shevchenko 3 participants 6 messages Dec 23, 2021 – Jan 24, 2022

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

PATCH 1/1 gpio: tegra: Get rid of duplicate of_node assignment

GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove these assignment all at once.

For the details one may look into the of_gpio_dev_init() implementation.

---
 drivers/gpio/gpio-tegra.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpio/gpio-tegra.c +0 -1
index 7f5bc10a6479..ff2d2a1f9c73 100644
@@ -691,7 +691,6 @@ static int tegra_gpio_probe(struct platform_device *pdev)
 	tgi->gc.base			= 0;
 	tgi->gc.ngpio			= tgi->bank_count * 32;
 	tgi->gc.parent			= &pdev->dev;
-	tgi->gc.of_node			= pdev->dev.of_node;
 
 	tgi->ic.name			= "GPIO";
 	tgi->ic.irq_ack			= tegra_gpio_irq_ack;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 5 lines · Andy Shevchenko

GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove these assignment all at once.

For the details one may look into the of_gpio_dev_init() implementation.

Any comments on this one?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 10 lines · Andy Shevchenko
Quoted 5 lines · Andy Shevchenko

GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove these assignment all at once.

For the details one may look into the of_gpio_dev_init() implementation.

Any comments on this one?

It looks good to me but I wanted to wait for Thierry's ack.

Bart

#3 lore raw
Quoted 8 lines · Bartosz Golaszewski
Quoted 6 lines · Andy Shevchenko
Quoted 4 lines · Andy Shevchenko

GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove these assignment all at once.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

For the details one may look into the of_gpio_dev_init() implementation.

Any comments on this one?

It looks good to me but I wanted to wait for Thierry's ack.

We have got a tag, I'll incorporate this to my usual PR, since we got into a new cycle anyway and this is not a fix. Same for other similar patches.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by Tested-by on v1 1/1
#4 lore raw
In reply to Andy Shevchenko
Quoted 10 lines · Andy Shevchenko

GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove these assignment all at once.

For the details one may look into the of_gpio_dev_init() implementation.

---
 drivers/gpio/gpio-tegra.c | 1 -
 1 file changed, 1 deletion(-)

Yep, this is indeed not necessary (anymore), so:

I've also given this a quick spin on a Tegra124 device (Venice 2) and everything seems to be working fine, so also:

Thanks,
Thierry

#5 lore raw
Quoted 4 lines · Thierry Reding
Quoted 3 lines · Andy Shevchenko

GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove these assignment all at once.

...

Quoted 8 lines

Yep, this is indeed not necessary (anymore), so:

I've also given this a quick spin on a Tegra124 device (Venice 2) and everything seems to be working fine, so also:

Thanks!

Signature · 2 lines
With Best Regards,
Andy Shevchenko