From: Vince Hsu Date: Thu, 28 Nov 2013 11:10:42 +0000 (+0800) Subject: regulator: as3722: set the correct current limit X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=6389075eff7dc1e6db39203c968394486c13b3e2;p=deliverable%2Flinux.git regulator: as3722: set the correct current limit Simple fix to set the correct current limit for SD0/1/6. Signed-off-by: Vince Hsu Signed-off-by: Mark Brown Fixes: bc407334e9a6 (regulator: as3722: add regulator driver for AMS AS3722) Cc: stable@vger.kernel.org --- diff --git a/drivers/regulator/as3722-regulator.c b/drivers/regulator/as3722-regulator.c index 5917fe3dc983..b9f1d24c6812 100644 --- a/drivers/regulator/as3722-regulator.c +++ b/drivers/regulator/as3722-regulator.c @@ -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); }