From 4e7f43b4e869ebdb2f6fa2f212cfcfec64eadd16 Mon Sep 17 00:00:00 2001 From: liuwang2 Date: Wed, 30 Sep 2020 11:25:33 +0800 Subject: [PATCH] denver: modify wl2864c driver [detail] use gpiod to eanble gpio, fix build error in Android R. Change-Id: I6ebf639b2f90ab1c66d1d7b4e5d78d2c85a09d37 Signed-off-by: liuwang2 Reviewed-on: https://gerrit.mot.com/1763843 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Dawei Wang Reviewed-by: Zhenxin Xi Reviewed-by: Long Cheng Submit-Approved: Jira Key --- drivers/regulator/wl2864c/wl2864c-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/wl2864c/wl2864c-regulator.c b/drivers/regulator/wl2864c/wl2864c-regulator.c index 0034dfeeae7d..b9068554c017 100644 --- a/drivers/regulator/wl2864c/wl2864c-regulator.c +++ b/drivers/regulator/wl2864c/wl2864c-regulator.c @@ -131,8 +131,8 @@ static int wl2864c_of_parse_cb(struct device_node *np, int ena_gpio; ena_gpio = of_get_named_gpio(np, "enable-gpios", 0); - if (ena_gpio) - config->ena_gpio = ena_gpio; + if (gpio_is_valid(ena_gpio)) + config->ena_gpiod = gpio_to_desc(ena_gpio); return 0; }