Commit 198b47dd authored by Enrico Scholz's avatar Enrico Scholz Committed by Mauro Carvalho Chehab

[media] mt9p031: fixed calculation of clk_div

There must be used 'min_t', not 'max_t' for calculating the divider.
Signed-off-by: default avatarEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent ac0eb480
......@@ -251,7 +251,7 @@ static int mt9p031_clk_setup(struct mt9p031 *mt9p031)
div = DIV_ROUND_UP(pdata->ext_freq, pdata->target_freq);
div = roundup_pow_of_two(div) / 2;
mt9p031->clk_div = max_t(unsigned int, div, 64);
mt9p031->clk_div = min_t(unsigned int, div, 64);
mt9p031->use_pll = false;
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