summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-22 16:33:26 +0300
committerLee Jones <lee.jones@linaro.org>2021-02-08 16:54:10 +0300
commitab099cc6e5d488d60c72f41a696f5c8ec159f9f1 (patch)
tree64d3c983b9bbf1e01c9962c07f9f3d256d929818 /drivers/mfd
parent9c03008da125c1007919a9186628af3cc105f526 (diff)
downloadlinux-ab099cc6e5d488d60c72f41a696f5c8ec159f9f1.tar.xz
mfd: mcp-sa11x0: Use DIV_ROUND_UP to calculate rw_timeout
Don't open-code DIV_ROUND_UP() kernel macro. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/mcp-sa11x0.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
index 98fa0af0e56e..4629dff187cd 100644
--- a/drivers/mfd/mcp-sa11x0.c
+++ b/drivers/mfd/mcp-sa11x0.c
@@ -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)