Message ID | 20211223122639.86923-1-andriy.shevchenko@linux.intel.com |
---|---|
State | Accepted |
Commit | b3376ed7d82f5937cecb17ff92d5d8dc0762e1c1 |
Headers | show |
Series | [v1,1/1] gpio: tegra: Get rid of duplicate of_node assignment | expand |
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?
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
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
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;
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(-)