mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
ASoC: wm8978: Use DIV_ROUND_UP() instead of open-coding it
Use DIV_ROUND_UP() instead of open-coding it, which intents and makes it
more clear what is going on for the casual reviewer.
The Coccinelle references Commit e4d8aef214
("ALSA: usb: Use
DIV_ROUND_UP() instead of open-coding it").
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220927140948.17696-3-shangxiaojing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ff091dd23b
commit
c544026098
@ -498,7 +498,7 @@ static int wm8978_configure_pll(struct snd_soc_component *component)
|
|||||||
|
|
||||||
if (4 * f_opclk < 3 * f_mclk)
|
if (4 * f_opclk < 3 * f_mclk)
|
||||||
/* Have to use OPCLKDIV */
|
/* Have to use OPCLKDIV */
|
||||||
opclk_div = (3 * f_mclk / 4 + f_opclk - 1) / f_opclk;
|
opclk_div = DIV_ROUND_UP(3 * f_mclk / 4, f_opclk);
|
||||||
else
|
else
|
||||||
opclk_div = 1;
|
opclk_div = 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user