From 3dee4d31723e7ecf44014ef4f96294b1ff3b4600 Mon Sep 17 00:00:00 2001 From: Vince Hsu Date: Thu, 28 Nov 2013 16:10:12 +0530 Subject: regulator: as3722: set the correct current limit Change-Id: I443987c8fc7c840d16bebf3bd24783bc51bab5be Signed-off-by: Vince Hsu Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/336651 --- drivers/regulator/as3722-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/as3722-regulator.c b/drivers/regulator/as3722-regulator.c index f9ea261724a6..83a42764240e 100644 --- a/drivers/regulator/as3722-regulator.c +++ b/drivers/regulator/as3722-regulator.c @@ -601,8 +601,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); } -- cgit v1.2.3