diff mbox series

[v2,1/1] clk: Fix best_parent_rate after moving code into a separate function

Message ID 20240201050023.1490448-2-kazuhiro3.hayashi@toshiba.co.jp (mailing list archive)
State Accepted, archived
Delegated to: Pavel Machek
Headers show
Series clk: Fix for restructuring for no reparent case | expand

Commit Message

Kazuhiro Hayashi Feb. 1, 2024, 5 a.m. UTC
From: Marek Szyprowski <m.szyprowski@samsung.com>

commit be8fa5fd0a48fd2decc4de81ffe72bb3ceacecd9 upstream.

best_parent_rate entry is still being used in the code and needs to be
always updated regardless of the CLK_SET_RATE_NO_REPARENT flag.

Fixes: 1b4e99fda73f ("clk: Move no reparent case into a separate function")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20230613131631.270192-1-m.szyprowski@samsung.com
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Reported-by: Yuki Saito <yuki.saito@toshiba.co.jp>
Reviewed-by: Kazuhiro Hayashi <kazuhiro3.hayashi@toshiba.co.jp>
---
 drivers/clk/clk.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index fe61fdc7c025..c048c6b1b8c3 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -614,6 +614,7 @@  clk_core_determine_rate_no_reparent(struct clk_hw *hw,
 		best = clk_core_get_rate_nolock(core);
 	}
 
+	req->best_parent_rate = best;
 	req->rate = best;
 
 	return 0;