clk: composite: Fix 'switching' to same clock
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Wed, 3 Nov 2021 12:24:41 +0000 (13:24 +0100)
committerStephen Boyd <sboyd@kernel.org>
Thu, 4 Nov 2021 00:49:54 +0000 (17:49 -0700)
commitc54ce354637058202621d55fec2ccba3fe62a219
treed5b2ddcb3075e02877710cba27b4631e87d906e6
parent9af0cbeb477cf36327eec4246a60c5e981b2bd1a
clk: composite: Fix 'switching' to same clock

During commit 6594988fd625 ("clk: composite: Use rate_ops.determine_rate
when also a mux is available") setting req->best_parent_hw got lost,
so best_parent_hw stays NULL during switch to the same parent. This
results in the (debug) message:
  clk_calc_new_rates: lcdif_pixel not gated but wants to reparent
and the following rate change is dropped.

Fixes: 6594988fd625 ("clk: composite: Use rate_ops.determine_rate when also a mux is available")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20211103122441.3208576-1-alexander.stein@ew.tq-group.com
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-composite.c