linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode
@ 2022-11-14 18:46 Andy Shevchenko
  2022-11-14 18:46 ` [PATCH v2 2/2] gpiolib: of: Drop redundant check in of_mm_gpiochip_remove() Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2022-11-14 18:46 UTC (permalink / raw)
  To: Bartosz Golaszewski, Dmitry Torokhov, linux-gpio, linux-kernel
  Cc: Linus Walleij, Andy Shevchenko

GPIO library is getting rid of of_node, fwnode should be utilized instead.
Prepare of_mm_gpiochip_add_data() for fwnode.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
v2: added tag (Linus), modified according to Dmitry's suggestion
 drivers/gpio/gpiolib-of.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 4be3c21aa718..d30a5210dfdd 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -935,8 +935,8 @@ int of_mm_gpiochip_add_data(struct device_node *np,
 	if (mm_gc->save_regs)
 		mm_gc->save_regs(mm_gc);
 
-	of_node_put(mm_gc->gc.of_node);
-	mm_gc->gc.of_node = of_node_get(np);
+	fwnode_handle_put(mm_gc->gc.fwnode);
+	mm_gc->gc.fwnode = fwnode_handle_get(of_fwnode_handle(np));
 
 	ret = gpiochip_add_data(gc, data);
 	if (ret)

base-commit: 8dab99c9eab3162bfb4326c35579a3388dbf68f2
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-15 11:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-14 18:46 [PATCH v2 1/2] gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode Andy Shevchenko
2022-11-14 18:46 ` [PATCH v2 2/2] gpiolib: of: Drop redundant check in of_mm_gpiochip_remove() Andy Shevchenko
2022-11-14 19:22 ` [PATCH v2 1/2] gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode Dmitry Torokhov
2022-11-15 11:01 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).