Skip to contentSkip to conversation

regulator: max77693: Fix trivial typo

PATCH Applied Axel Lin 3 participants 3 messages Jun 29, 2013 – Jul 1, 2013

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: max77693: Fix trivial typo

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

---
 drivers/regulator/max77693.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/max77693.c +1 -1
index 674ece7..d45a4dd 100644
@@ -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 */
Signature · 1 line
1.8.1.2
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Axel Lin

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

---
 drivers/regulator/max77693.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/max77693.c +0 -0
index 674ece7..d45a4dd 100644

drivers/regulator/max77693.c static int max77693_chg_set_current_limit(struct regulator_dev *rdev, · line 103

Quoted 8 lines
drivers/regulator/max77693.c +1 -1
@@ -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 */

Thanks,
Jonghwa

maintainer Applied
#2 lore raw
In reply to Axel Lin
Quoted 1 line · Axel Lin

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

Applied, thanks.