2013-06-29 03:37:36

by Axel Lin

[permalink] [raw]
Subject: [PATCH] regulator: max77693: Fix trivial typo

Fix trivial typo in the equation to check upper bound of current setting.

Signed-off-by: Axel Lin <[email protected]>
---
drivers/regulator/max77693.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c
index 674ece7..d45a4dd 100644
--- a/drivers/regulator/max77693.c
+++ b/drivers/regulator/max77693.c
@@ -97,7 +97,7 @@ static int max77693_chg_set_current_limit(struct regulator_dev *rdev,
while (chg_min_uA + CHGIN_ILIM_STEP_20mA * sel < min_uA)
sel++;

- if (chg_min_uA * CHGIN_ILIM_STEP_20mA * sel > max_uA)
+ if (chg_min_uA + CHGIN_ILIM_STEP_20mA * sel > max_uA)
return -EINVAL;

/* the first four codes for charger current are all 60mA */
--
1.8.1.2



2013-06-30 23:51:50

by Jonghwa Lee

[permalink] [raw]
Subject: Re: [PATCH] regulator: max77693: Fix trivial typo

On 2013년 06월 29일 12:37, Axel Lin wrote:

> Fix trivial typo in the equation to check upper bound of current setting.
>
> Signed-off-by: Axel Lin <[email protected]>
> ---
> drivers/regulator/max77693.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c
> index 674ece7..d45a4dd 100644
> --- a/drivers/regulator/max77693.c
> +++ b/drivers/regulator/max77693.c
> @@ -97,7 +97,7 @@ static int max77693_chg_set_current_limit(struct regulator_dev *rdev,
> while (chg_min_uA + CHGIN_ILIM_STEP_20mA * sel < min_uA)
> sel++;
>
> - if (chg_min_uA * CHGIN_ILIM_STEP_20mA * sel > max_uA)
> + if (chg_min_uA + CHGIN_ILIM_STEP_20mA * sel > max_uA)
> return -EINVAL;
>
> /* the first four codes for charger current are all 60mA */


Acked-by: Jonghwa Lee <[email protected]>


Thanks,
Jonghwa

2013-07-01 10:15:47

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] regulator: max77693: Fix trivial typo

On Sat, Jun 29, 2013 at 11:37:29AM +0800, Axel Lin wrote:
> Fix trivial typo in the equation to check upper bound of current setting.

Applied, thanks.


Attachments:
(No filename) (152.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments