diff mbox series

clk: Fix best_parent_rate after moving code into a separate function

Message ID 20230613131631.270192-1-m.szyprowski@samsung.com (mailing list archive)
State Accepted, archived
Headers show
Series clk: Fix best_parent_rate after moving code into a separate function | expand

Commit Message

Marek Szyprowski June 13, 2023, 1:16 p.m. UTC
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>
---
 drivers/clk/clk.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Maxime Ripard June 13, 2023, 2:53 p.m. UTC | #1
On Tue, Jun 13, 2023 at 03:16:31PM +0200, Marek Szyprowski wrote:
> 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>

Acked-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime
Stephen Boyd June 13, 2023, 7 p.m. UTC | #2
Quoting Marek Szyprowski (2023-06-13 06:16:31)
> 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>
> ---

Applied to clk-next
diff mbox series

Patch

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ffc9f03840b7..7ac9f7a8cb84 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -629,6 +629,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;