Commit ab099cc6 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Lee Jones

mfd: mcp-sa11x0: Use DIV_ROUND_UP to calculate rw_timeout

Don't open-code DIV_ROUND_UP() kernel macro.
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 9c03008d
......@@ -214,8 +214,7 @@ static int mcp_sa11x0_probe(struct platform_device *dev)
* rate. This is the period for 3 64-bit frames. Always
* round this time up.
*/
mcp->rw_timeout = (64 * 3 * 1000000 + mcp->sclk_rate - 1) /
mcp->sclk_rate;
mcp->rw_timeout = DIV_ROUND_UP(64 * 3 * 1000000, mcp->sclk_rate);
ret = mcp_host_add(mcp, data->codec_pdata);
if (ret == 0)
......
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