clk: samsung: pll: Do not return error codes in round_rate callback
authorTomasz Figa <t.figa@samsung.com>
Fri, 1 Mar 2013 17:28:31 +0000 (18:28 +0100)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:42:38 +0000 (11:42 +0900)
This patch modifies pll35xx round_rate callback to return current
frequency instead of error codes to avoid problems caused by clock core
using error codes as frequencies.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
drivers/clk/samsung/clk-pll.c

index 26292d4..1abdfba 100644 (file)
@@ -81,14 +81,14 @@ static long samsung_pll35xx_round_rate(struct clk_hw *hw,
 
        if (!pms) {
                pr_err("%s: no pms table passed", __func__);
-               return -ENOTSUPP;
+               return samsung_pll35xx_recalc_rate(hw, *prate);
        }
 
        for (i = 0; pms[i].f_out != F_OUT_INVAL; i++)
                if (drate >= pms[i].f_out)
                        return pms[i].f_out;
 
-       return -EINVAL;
+       return samsung_pll35xx_recalc_rate(hw, *prate);
 }
 
 static int samsung_pll35xx_set_rate(struct clk_hw *hw, unsigned long drate,