regulator: max77693: Fix trivial typo
authorAxel Lin <axel.lin@ingics.com>
Sat, 29 Jun 2013 03:37:29 +0000 (11:37 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 1 Jul 2013 10:15:38 +0000 (11:15 +0100)
Fix trivial typo in the equation to check upper bound of current setting.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/max77693.c

index 674ece7..d45a4dd 100644 (file)
@@ -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 */