diff mbox series

[v1,1/1] gpio: tegra: Get rid of duplicate of_node assignment

Message ID 20211223122639.86923-1-andriy.shevchenko@linux.intel.com
State Not Applicable
Headers show
Series [v1,1/1] gpio: tegra: Get rid of duplicate of_node assignment | expand

Commit Message

Andy Shevchenko Dec. 23, 2021, 12:26 p.m. UTC
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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-tegra.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Andy Shevchenko Jan. 5, 2022, 2:23 p.m. UTC | #1
On Thu, Dec 23, 2021 at 02:26:39PM +0200, Andy Shevchenko wrote:
> 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?
Bartosz Golaszewski Jan. 6, 2022, 8:42 a.m. UTC | #2
On Wed, Jan 5, 2022 at 3:33 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Dec 23, 2021 at 02:26:39PM +0200, Andy Shevchenko wrote:
> > 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
Thierry Reding Jan. 12, 2022, 1:11 p.m. UTC | #3
On Thu, Dec 23, 2021 at 02:26:39PM +0200, Andy Shevchenko wrote:
> 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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/gpio/gpio-tegra.c | 1 -
>  1 file changed, 1 deletion(-)

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

Reviewed-by: Thierry Reding <treding@nvidia.com>

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

Tested-by: Thierry Reding <treding@nvidia.com>

Thanks,
Thierry
Andy Shevchenko Jan. 12, 2022, 1:48 p.m. UTC | #4
On Wed, Jan 12, 2022 at 02:11:45PM +0100, Thierry Reding wrote:
> On Thu, Dec 23, 2021 at 02:26:39PM +0200, Andy Shevchenko wrote:
> > 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.

...

> Yep, this is indeed not necessary (anymore), so:
> 
> Reviewed-by: Thierry Reding <treding@nvidia.com>
> 
> I've also given this a quick spin on a Tegra124 device (Venice 2) and
> everything seems to be working fine, so also:
> 
> Tested-by: Thierry Reding <treding@nvidia.com>

Thanks!
Andy Shevchenko Jan. 24, 2022, 3:10 p.m. UTC | #5
On Thu, Jan 06, 2022 at 09:42:15AM +0100, Bartosz Golaszewski wrote:
> On Wed, Jan 5, 2022 at 3:33 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Thu, Dec 23, 2021 at 02:26:39PM +0200, Andy Shevchenko wrote:
> > > 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.

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.
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 7f5bc10a6479..ff2d2a1f9c73 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -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;