Message ID | 20221114184626.64214-1-andriy.shevchenko@linux.intel.com |
---|---|
State | Accepted |
Commit | 77289b2f5aa3535a2e49b448c6afb36f5526016a |
Headers | show |
Series | [v2,1/2] gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode | expand |
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)