diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2015-02-04 09:53:32 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-02 20:19:04 -0400 |
commit | 198b47ddd23498cd88f4ec2c2a050eb727cc357c (patch) | |
tree | 11af4bafd4a0dc1044e14a981174e6997d703554 /drivers/media/i2c | |
parent | ac0eb4809e88357b885c72b4e95def98235613c8 (diff) |
[media] mt9p031: fixed calculation of clk_div
There must be used 'min_t', not 'max_t' for calculating the divider.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/mt9p031.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index c56a58b47c78..e06759c6cb91 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c | |||
@@ -251,7 +251,7 @@ static int mt9p031_clk_setup(struct mt9p031 *mt9p031) | |||
251 | div = DIV_ROUND_UP(pdata->ext_freq, pdata->target_freq); | 251 | div = DIV_ROUND_UP(pdata->ext_freq, pdata->target_freq); |
252 | div = roundup_pow_of_two(div) / 2; | 252 | div = roundup_pow_of_two(div) / 2; |
253 | 253 | ||
254 | mt9p031->clk_div = max_t(unsigned int, div, 64); | 254 | mt9p031->clk_div = min_t(unsigned int, div, 64); |
255 | mt9p031->use_pll = false; | 255 | mt9p031->use_pll = false; |
256 | 256 | ||
257 | return 0; | 257 | return 0; |