Commit 6389075e authored by Vince Hsu's avatar Vince Hsu Committed by Mark Brown

regulator: as3722: set the correct current limit

Simple fix to set the correct current limit for SD0/1/6.
Signed-off-by: default avatarVince Hsu <vinceh@nvidia.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
Fixes: bc407334 (regulator: as3722: add regulator driver for AMS AS3722)
Cc: stable@vger.kernel.org
parent 6ce4eac1
...@@ -590,8 +590,8 @@ static int as3722_sd016_set_current_limit(struct regulator_dev *rdev, ...@@ -590,8 +590,8 @@ static int as3722_sd016_set_current_limit(struct regulator_dev *rdev,
default: default:
return -EINVAL; return -EINVAL;
} }
ret <<= ffs(mask) - 1;
val = ret & mask; val = ret & mask;
val <<= ffs(mask) - 1;
return as3722_update_bits(as3722, reg, mask, val); return as3722_update_bits(as3722, reg, mask, val);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment