From: Krzysztof Kozlowski Date: Mon, 9 Sep 2019 15:57:23 +0000 (+0200) Subject: regulator: s2mps11: Consistently use local variable X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d57d90f4443bd725b3facdc6130a1940af4560c4;p=openwrt%2Fstaging%2Fblogic.git regulator: s2mps11: Consistently use local variable The value under 's2mps11->ext_control_gpiod[i]' is assigned to local variable and used in probe in one place before. Use it consistently later so code will be easier to read. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20190909155723.24734-1-krzk@kernel.org Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 054baaadfdfd..5bc00884cf51 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -1226,7 +1226,7 @@ common_reg: goto out; } - if (s2mps11->ext_control_gpiod[i]) { + if (config.ena_gpiod) { ret = s2mps14_pmic_enable_ext_control(s2mps11, regulator); if (ret < 0) {