public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: at91: fix determine_rate prototype (again)
@ 2015-06-18 10:32 Boris Brezillon
  2015-06-18 20:49 ` Michael Turquette
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Brezillon @ 2015-06-18 10:32 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Nicolas Ferre, Jean-Christophe Plagniol-Villard,
	Alexandre Belloni, Mike Turquette, Stephen Boyd, linux-clk,
	Jiří Prchal, Boris Brezillon, stable

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 <boris.brezillon@free-electrons.com>
Reported-by: Jiří Prchal <jiri.prchal@aksignal.cz>
Tested-by: Jiří Prchal <jiri.prchal@aksignal.cz>
Fixes: 76723e7ed589998384a080e29204df4659c67cf2 ("clk: at91: usb: fix
determine_rate prototype")
Cc: <stable@vger.kernel.org> # 3.18
---
 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)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-18 20:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-18 10:32 [PATCH] clk: at91: fix determine_rate prototype (again) Boris Brezillon
2015-06-18 20:49 ` Michael Turquette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox