Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <krzk@kernel.org>
Link: https://lore.kernel.org/r/20190909155723.24734-1-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
d57d90f4 6cadd8ae

+1 -1
+1 -1
drivers/regulator/s2mps11.c
··· 1226 1226 goto out; 1227 1227 } 1228 1228 1229 - if (s2mps11->ext_control_gpiod[i]) { 1229 + if (config.ena_gpiod) { 1230 1230 ret = s2mps14_pmic_enable_ext_control(s2mps11, 1231 1231 regulator); 1232 1232 if (ret < 0) {