summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/mt6370-regulator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/mt6370-regulator.c b/drivers/regulator/mt6370-regulator.c
index bc356b4bbf22..949b2c7b5556 100644
--- a/drivers/regulator/mt6370-regulator.c
+++ b/drivers/regulator/mt6370-regulator.c
@@ -153,7 +153,8 @@ static int mt6370_of_parse_cb(struct device_node *np,
 	struct gpio_desc *enable_gpio;
 	int ret;
 
-	enable_gpio = gpiod_get_from_of_node(np, "enable", 0, GPIOD_OUT_HIGH |
+	enable_gpio = fwnode_gpiod_get_index(of_fwnode_handle(np), "enable", 0,
+					     GPIOD_OUT_HIGH |
 					     GPIOD_FLAGS_BIT_NONEXCLUSIVE,
 					     desc->name);
 	if (IS_ERR(enable_gpio)) {