Commit eefe77fd authored by Shang XiaoJing's avatar Shang XiaoJing Committed by Takashi Iwai

ALSA: sb: 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 e4d8aef2 ("ALSA: usb: Use
DIV_ROUND_UP() instead of open-coding it").
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20220927141110.18033-1-shangxiaojing@huawei.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d1c44201
......@@ -236,7 +236,7 @@ static int emu8k_pcm_open(struct snd_pcm_substream *subs)
/* use timer to update periods.. (specified in msec) */
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_TIME,
(1000000 + HZ - 1) / HZ, UINT_MAX);
DIV_ROUND_UP(1000000, HZ), UINT_MAX);
return 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