clk: mmp: fix wrong mask when calculate denominator

The code has typo when calculate denominator. It should use
den_mask instead of num_mask.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
This commit is contained in:
Chao Xie 2014-01-23 10:47:40 +08:00 committed by Mike Turquette
parent 43080568f7
commit 7433ab43fa

View file

@ -64,7 +64,7 @@ static unsigned long clk_factor_recalc_rate(struct clk_hw *hw,
num = (val >> masks->num_shift) & masks->num_mask; num = (val >> masks->num_shift) & masks->num_mask;
/* calculate denominator */ /* calculate denominator */
den = (val >> masks->den_shift) & masks->num_mask; den = (val >> masks->den_shift) & masks->den_mask;
if (!den) if (!den)
return 0; return 0;