lkml.org 
[lkml]   [2013]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] regulator: max77693: Fix trivial typo
From
Date
Fix trivial typo in the equation to check upper bound of current setting.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
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




\
 
 \ /
  Last update: 2013-06-29 05:41    [W:0.041 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site