summaryrefslogtreecommitdiff
path: root/drivers/video/ipu_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/ipu_common.c')
-rw-r--r--drivers/video/ipu_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index 36d4b23..5676a0f 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -352,7 +352,9 @@ static int ipu_pixel_clk_set_rate(struct clk *clk, unsigned long rate)
*/
__raw_writel((div / 16) << 16, DI_BS_CLKGEN1(clk->id));
- clk->rate = (u64)(clk->parent->rate * 16) / div;
+ do_div(parent_rate, div);
+
+ clk->rate = parent_rate;
return 0;
}