regulator: s2mps11: Consistently use local variable
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 9 Sep 2019 15:57:23 +0000 (17:57 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 10 Sep 2019 10:03:30 +0000 (11:03 +0100)
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>
drivers/regulator/s2mps11.c

index 054baaadfdfddc39c83f7ffd1fa58c6a29f2eb7f..5bc00884cf512d4ebecfe470603a97f9a3827a43 100644 (file)
@@ -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) {