regulator: tps65090: fix issue with dcdc external control
Laxman Dewangan [Thu, 11 Oct 2012 11:25:19 +0000 (16:25 +0530)]
There is issue where external control is getting enabled
even when it is not selected from platform data.

Fixing this issue.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/143603
(cherry picked from commit cc79b18e4e007ff3f0728a31f79aa360bd745e45)

Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Change-Id: I6f067b05cfa5bb81353746564420468fa6f5ef1c
Reviewed-on: http://git-master/r/146391
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

drivers/regulator/tps65090-regulator.c

index b480e97..4d28dc1 100644 (file)
@@ -56,7 +56,7 @@ static inline bool is_dcdc(int id)
 {
        if ((id == TPS65090_REGULATOR_DCDC1) ||
                        (id == TPS65090_REGULATOR_DCDC2) ||
-                       (id == TPS65090_REGULATOR_DCDC2))
+                       (id == TPS65090_REGULATOR_DCDC3))
                return true;
        return false;
 }
@@ -206,6 +206,7 @@ static int __devinit tps65090_regulator_preinit(int id,
                                ri->rinfo->reg_en_reg);
                        return ret;
                }
+               return ret;
        }
 
        if (gpio_is_valid(tps_pdata->gpio)) {