regulator: ab8500: Let regulator core handle the case no delay for setting new voltag...
authorAxel Lin <axel.lin@gmail.com>
Mon, 21 May 2012 01:39:08 +0000 (09:39 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 3 Jun 2012 12:25:03 +0000 (13:25 +0100)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/ab8500.c

index da883e661b3889bb0bb2177e94647277ee8fb9e4..f158074490112925c3904e417d6d4aed954064e1 100644 (file)
@@ -256,14 +256,7 @@ static int ab8500_regulator_set_voltage_time_sel(struct regulator_dev *rdev,
                                             unsigned int new_sel)
 {
        struct ab8500_regulator_info *info = rdev_get_drvdata(rdev);
-       int ret;
 
-       /* If the regulator isn't on, it won't take time here */
-       ret = ab8500_regulator_is_enabled(rdev);
-       if (ret < 0)
-               return ret;
-       if (!ret)
-               return 0;
        return info->delay;
 }