Skip to content

Commit 77289b2

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode
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> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent e7f9ff5 commit 77289b2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpio/gpiolib-of.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,8 +934,8 @@ int of_mm_gpiochip_add_data(struct device_node *np,
934934
if (mm_gc->save_regs)
935935
mm_gc->save_regs(mm_gc);
936936

937-
of_node_put(mm_gc->gc.of_node);
938-
mm_gc->gc.of_node = of_node_get(np);
937+
fwnode_handle_put(mm_gc->gc.fwnode);
938+
mm_gc->gc.fwnode = fwnode_handle_get(of_fwnode_handle(np));
939939

940940
ret = gpiochip_add_data(gc, data);
941941
if (ret)

0 commit comments

Comments
 (0)