On Thu Oct 16 12:16:28 2025 -0400, Brian Masney wrote:
> The round_rate() clk ops is deprecated, so migrate this driver from
> round_rate() to determine_rate() using the Coccinelle semantic patch
> on the cover letter of this series.
>
> Signed-off-by: Brian Masney <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/i2c/tc358746.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c
index bcfc274cf891..86d9ba3ea4e5 100644
--- a/drivers/media/i2c/tc358746.c
+++ b/drivers/media/i2c/tc358746.c
@@ -1222,14 +1222,16 @@ tc358746_recalc_rate(struct clk_hw *hw, unsigned long
parent_rate)
return tc358746->pll_rate / (prediv * postdiv);
}
-static long tc358746_mclk_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *parent_rate)
+static int tc358746_mclk_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
struct tc358746 *tc358746 = clk_hw_to_tc358746(hw);
- *parent_rate = tc358746->pll_rate;
+ req->best_parent_rate = tc358746->pll_rate;
- return tc358746_find_mclk_settings(tc358746, rate);
+ req->rate = tc358746_find_mclk_settings(tc358746, req->rate);
+
+ return 0;
}
static int tc358746_mclk_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -1246,7 +1248,7 @@ static const struct clk_ops tc358746_mclk_ops = {
.enable = tc358746_mclk_enable,
.disable = tc358746_mclk_disable,
.recalc_rate = tc358746_recalc_rate,
- .round_rate = tc358746_mclk_round_rate,
+ .determine_rate = tc358746_mclk_determine_rate,
.set_rate = tc358746_mclk_set_rate,
};
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]