From: Chao Xie Date: Thu, 23 Jan 2014 02:47:40 +0000 (+0800) Subject: clk: mmp: fix wrong mask when calculate denominator X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7433ab43fa17094173f18a39f33c3a24d50b300f;p=linux-beck.git 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 Signed-off-by: Mike Turquette --- diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c index 80c1dd15d15c..f6e7691c4efa 100644 --- a/drivers/clk/mmp/clk-frac.c +++ b/drivers/clk/mmp/clk-frac.c @@ -64,7 +64,7 @@ static unsigned long clk_factor_recalc_rate(struct clk_hw *hw, num = (val >> masks->num_shift) & masks->num_mask; /* calculate denominator */ - den = (val >> masks->den_shift) & masks->num_mask; + den = (val >> masks->den_shift) & masks->den_mask; if (!den) return 0;