Commit c60934d5 authored by Brian Masney's avatar Brian Masney Committed by Ulf Hansson
Browse files

pmdomain: mediatek: airoha: convert from round_rate() to determine_rate()



The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
appended to the "under-the-cut" portion of the patch.

Note that prior to running the Coccinelle,
airoha_cpu_pmdomain_clk_round() was renamed to
airoha_cpu_pmdomain_clk_round_rate().

Signed-off-by: default avatarBrian Masney <bmasney@redhat.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5b3a897c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -21,10 +21,10 @@ struct airoha_cpu_pmdomain_priv {
	struct generic_pm_domain pd;
};

static long airoha_cpu_pmdomain_clk_round(struct clk_hw *hw, unsigned long rate,
					  unsigned long *parent_rate)
static int airoha_cpu_pmdomain_clk_determine_rate(struct clk_hw *hw,
						  struct clk_rate_request *req)
{
	return rate;
	return 0;
}

static unsigned long airoha_cpu_pmdomain_clk_get(struct clk_hw *hw,
@@ -48,7 +48,7 @@ static int airoha_cpu_pmdomain_clk_is_enabled(struct clk_hw *hw)
static const struct clk_ops airoha_cpu_pmdomain_clk_ops = {
	.recalc_rate = airoha_cpu_pmdomain_clk_get,
	.is_enabled = airoha_cpu_pmdomain_clk_is_enabled,
	.round_rate = airoha_cpu_pmdomain_clk_round,
	.determine_rate = airoha_cpu_pmdomain_clk_determine_rate,
};

static int airoha_cpu_pmdomain_set_performance_state(struct generic_pm_domain *domain,