Skip to content

Commit c60934d

Browse files
masneybstorulf
authored andcommitted
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: Brian Masney <bmasney@redhat.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 5b3a897 commit c60934d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ struct airoha_cpu_pmdomain_priv {
2121
struct generic_pm_domain pd;
2222
};
2323

24-
static long airoha_cpu_pmdomain_clk_round(struct clk_hw *hw, unsigned long rate,
25-
unsigned long *parent_rate)
24+
static int airoha_cpu_pmdomain_clk_determine_rate(struct clk_hw *hw,
25+
struct clk_rate_request *req)
2626
{
27-
return rate;
27+
return 0;
2828
}
2929

3030
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)
4848
static const struct clk_ops airoha_cpu_pmdomain_clk_ops = {
4949
.recalc_rate = airoha_cpu_pmdomain_clk_get,
5050
.is_enabled = airoha_cpu_pmdomain_clk_is_enabled,
51-
.round_rate = airoha_cpu_pmdomain_clk_round,
51+
.determine_rate = airoha_cpu_pmdomain_clk_determine_rate,
5252
};
5353

5454
static int airoha_cpu_pmdomain_set_performance_state(struct generic_pm_domain *domain,

0 commit comments

Comments
 (0)