Commit ec93db1f authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

hi846: use do_div() for divisions

appearently there are architectures where build bots find errors
otherwise.
parent cc7f6b09
......@@ -1569,11 +1569,12 @@ static int hi846_set_video_mode(struct hi846 *hi846, int fps)
int frame_length;
int ret;
int dummy_lines;
s64 link_freq = hi846_get_link_freq(hi846);
dev_dbg(&client->dev, "%s: link freq: %lld\n", __func__,
hi846_get_link_freq(hi846));
frame_length = hi846_get_link_freq(hi846) / fps / HI846_LINE_LENGTH;
frame_length = do_div(link_freq, do_div(fps, HI846_LINE_LENGTH));
dummy_lines = (frame_length > hi846->cur_mode->frame_len) ?
(frame_length - hi846->cur_mode->frame_len) : 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