diff options
author | Peng Fan <Peng.Fan@freescale.com> | 2015-07-28 22:47:08 +0800 |
---|---|---|
committer | Przemyslaw Marczak <p.marczak@samsung.com> | 2015-08-12 11:17:37 +0200 |
commit | 8640522d2d2d26caaf1805f3de696a7a6fb1cc22 (patch) | |
tree | 1ec98cc4026e821599e8008085c7f35982e2c776 /drivers | |
parent | 125914d4beb1e8319d7a04e6a6e88290763594f8 (diff) | |
download | u-boot-imx-8640522d2d2d26caaf1805f3de696a7a6fb1cc22.zip u-boot-imx-8640522d2d2d26caaf1805f3de696a7a6fb1cc22.tar.gz u-boot-imx-8640522d2d2d26caaf1805f3de696a7a6fb1cc22.tar.bz2 |
power: regulator: max77686 correct variable type
The return type of pmic_read and pmic_write is signed int, so
correct variable 'ret' from type unsigned int to int.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/regulator/max77686.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c index 946b87c..9d23c19 100644 --- a/drivers/power/regulator/max77686.c +++ b/drivers/power/regulator/max77686.c @@ -319,9 +319,9 @@ static int max77686_ldo_modes(int ldo, struct dm_regulator_mode **modesp, static int max77686_ldo_val(struct udevice *dev, int op, int *uV) { - unsigned int ret, hex, adr; + unsigned int hex, adr; unsigned char val; - int ldo; + int ldo, ret; if (op == PMIC_OP_GET) *uV = 0; @@ -360,9 +360,9 @@ static int max77686_ldo_val(struct udevice *dev, int op, int *uV) static int max77686_buck_val(struct udevice *dev, int op, int *uV) { - unsigned int hex, ret, mask, adr; + unsigned int hex, mask, adr; unsigned char val; - int buck; + int buck, ret; buck = dev->driver_data; if (buck < 1 || buck > MAX77686_BUCK_NUM) { @@ -414,9 +414,9 @@ static int max77686_buck_val(struct udevice *dev, int op, int *uV) static int max77686_ldo_mode(struct udevice *dev, int op, int *opmode) { - unsigned int ret, adr, mode; + unsigned int adr, mode; unsigned char val; - int ldo; + int ldo, ret; if (op == PMIC_OP_GET) *opmode = -EINVAL; @@ -545,9 +545,9 @@ static int max77686_ldo_enable(struct udevice *dev, int op, bool *enable) static int max77686_buck_mode(struct udevice *dev, int op, int *opmode) { - unsigned int ret, mask, adr, mode, mode_shift; + unsigned int mask, adr, mode, mode_shift; unsigned char val; - int buck; + int buck, ret; buck = dev->driver_data; if (buck < 1 || buck > MAX77686_BUCK_NUM) { |