summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2015-02-04 11:53:32 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-02 21:19:04 -0300
commit198b47ddd23498cd88f4ec2c2a050eb727cc357c (patch)
tree11af4bafd4a0dc1044e14a981174e6997d703554 /drivers/media/i2c
parentac0eb4809e88357b885c72b4e95def98235613c8 (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.c2
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)
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;