]> Pileus Git - ~andy/linux/blobdiff - drivers/regulator/wm8994-regulator.c
regulator: max8998 BUCK1/2 voltage change with use of GPIOs
[~andy/linux] / drivers / regulator / wm8994-regulator.c
index 5a1dc8a24d355bcdf5e9e741c0a9acab6e7ced5c..03713bc66e4a88b9bfda453a0085eb9132bdad60 100644 (file)
@@ -219,8 +219,6 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
 
        ldo->wm8994 = wm8994;
 
-       ldo->is_enabled = true;
-
        if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) {
                ldo->enable = pdata->ldo[id].enable;
 
@@ -237,7 +235,8 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
                                ret);
                        goto err_gpio;
                }
-       }
+       } else
+               ldo->is_enabled = true;
 
        ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &pdev->dev,
                                             pdata->ldo[id].init_data, ldo);