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 |
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
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!
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 --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(-)