From: Boris Brezillon <[email protected]>

Commit ae74ea64ccdb8b99ee2618b58020263d5b1d9b22 ("clk: at91: usb:
propagate rate modification to the parent clk") was a backport of a bug
fix applied in 4.0, but in the meantime the ->determine_rate() prototype
has changed, thus introduction a prototype mismatch bug in pre-4.0
kernels. This prototype mismatch was supposed to be fixed by commit
76723e7ed589998384a080e29204df4659c67cf2, which fix the bug on 3.19 kernels,
but the ->determine_rate() has also changed between 3.18 and 3.19.
Hopefully this patch will definitely fix the prototype mismatch for 3.18.

Signed-off-by: Boris Brezillon <[email protected]>
Reported-by: Jiří Prchal <[email protected]>
Tested-by: Jiří Prchal <[email protected]>
Fixes: 76723e7ed589998384a080e29204df4659c67cf2 ("clk: at91: usb: fix
determine_rate prototype")
Cc: <[email protected]> # 3.18
Signed-off-by: Sasha Levin <[email protected]>
---
 drivers/clk/at91/clk-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
index 0283a57..d0d335d 100644
--- a/drivers/clk/at91/clk-usb.c
+++ b/drivers/clk/at91/clk-usb.c
@@ -59,7 +59,7 @@ static unsigned long at91sam9x5_clk_usb_recalc_rate(struct 
clk_hw *hw,
 static long at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
                                              unsigned long rate,
                                              unsigned long *best_parent_rate,
-                                             struct clk_hw **best_parent_hw)
+                                             struct clk **best_parent_clk)
 {
        struct clk *parent = NULL;
        long best_rate = -EINVAL;
@@ -91,7 +91,7 @@ static long at91sam9x5_clk_usb_determine_rate(struct clk_hw 
*hw,
                                best_rate = tmp_rate;
                                best_diff = tmp_diff;
                                *best_parent_rate = tmp_parent_rate;
-                               *best_parent_hw = __clk_get_hw(parent);
+                               *best_parent_clk = parent;
                        }
 
                        if (!best_diff || tmp_rate < rate)
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to