Skip to contentSkip to conversation

regulator: as3722: set the correct current limit

PATCH Applied Vince Hsu 2 participants 2 messages Nov 28, 2013 – Nov 29, 2013 Voltage and current regulator framework

lore
Share & tools
lore

Vince Hsu

author
#0 lore raw

PATCH 1/1 regulator: as3722: set the correct current limit

Simple fix to set the correct current limit for SD0/1/6.

---
 drivers/regulator/as3722-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/as3722-regulator.c +1 -1
index 5917fe3dc983..b9f1d24c6812 100644
@@ -590,8 +590,8 @@ static int as3722_sd016_set_current_limit(struct regulator_dev *rdev,
 	default:
 		return -EINVAL;
 	}
+	ret <<= ffs(mask) - 1;
 	val = ret & mask;
-	val <<= ffs(mask) - 1;
 	return as3722_update_bits(as3722, reg, mask, val);
 }
 
Signature · 1 line
1.8.1.5
maintainer Applied
#1 lore raw
Quoted 1 line · Vince Hsu

Simple fix to set the correct current limit for SD0/1/6.

Applied, thanks.