projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c03008
)
mfd: mcp-sa11x0: Use DIV_ROUND_UP to calculate rw_timeout
author
Zheng Yongjun
<zhengyongjun3@huawei.com>
Tue, 22 Dec 2020 13:33:26 +0000
(21:33 +0800)
committer
Lee Jones
<lee.jones@linaro.org>
Mon, 8 Feb 2021 13:54:10 +0000
(13:54 +0000)
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>
drivers/mfd/mcp-sa11x0.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/mcp-sa11x0.c
b/drivers/mfd/mcp-sa11x0.c
index
98fa0af
..
4629dff
100644
(file)
--- 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)