提交 dce7304f 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: Use DIV_ROUND_CLOSEST in wm8350_isink_get_current

DIV_ROUND_CLOSEST performs the computation (x + d/2)/d with better readability.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 85c5d86d
......@@ -186,7 +186,7 @@ static int wm8350_isink_get_current(struct regulator_dev *rdev)
return 0;
}
return (isink_cur[val] + 50) / 100;
return DIV_ROUND_CLOSEST(isink_cur[val], 100);
}
/* turn on ISINK followed by DCDC */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册