]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
power: sandbox: fixed: get_enable should return integer
authorKeerthy <j-keerthy@ti.com>
Tue, 13 Jun 2017 04:23:53 +0000 (09:53 +0530)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 19 Jul 2017 10:13:59 +0000 (19:13 +0900)
get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/power/regulator/sandbox.c

index 2cca579a571a550a8b3ee78125466bd76f665496..06c09fd05151ce7b7ad0f7e638a310f6f54fef13 100644 (file)
@@ -234,7 +234,7 @@ static int buck_set_current(struct udevice *dev, int uA)
                              buck_current_range, uA);
 }
 
-static bool buck_get_enable(struct udevice *dev)
+static int buck_get_enable(struct udevice *dev)
 {
        if (out_get_mode(dev) == BUCK_OM_OFF)
                return false;
@@ -310,7 +310,7 @@ static int ldo_set_current(struct udevice *dev, int uA)
                             ldo_current_range, uA);
 }
 
-static bool ldo_get_enable(struct udevice *dev)
+static int ldo_get_enable(struct udevice *dev)
 {
        if (out_get_mode(dev) == LDO_OM_OFF)
                return false;