mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 08:38:45 +02:00 
			
		
		
		
	clk: ux500: prcmu: 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 on the cover letter of this series. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
		
							parent
							
								
									f32c0f8b90
								
							
						
					
					
						commit
						7a19c341d5
					
				
					 1 changed files with 8 additions and 6 deletions
				
			
		|  | @ -53,11 +53,13 @@ static unsigned long clk_prcmu_recalc_rate(struct clk_hw *hw, | ||||||
| 	return prcmu_clock_rate(clk->cg_sel); | 	return prcmu_clock_rate(clk->cg_sel); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static long clk_prcmu_round_rate(struct clk_hw *hw, unsigned long rate, | static int clk_prcmu_determine_rate(struct clk_hw *hw, | ||||||
| 				 unsigned long *parent_rate) | 				    struct clk_rate_request *req) | ||||||
| { | { | ||||||
| 	struct clk_prcmu *clk = to_clk_prcmu(hw); | 	struct clk_prcmu *clk = to_clk_prcmu(hw); | ||||||
| 	return prcmu_round_clock_rate(clk->cg_sel, rate); | 	req->rate = prcmu_round_clock_rate(clk->cg_sel, req->rate); | ||||||
|  | 
 | ||||||
|  | 	return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static int clk_prcmu_set_rate(struct clk_hw *hw, unsigned long rate, | static int clk_prcmu_set_rate(struct clk_hw *hw, unsigned long rate, | ||||||
|  | @ -157,7 +159,7 @@ static const struct clk_ops clk_prcmu_scalable_ops = { | ||||||
| 	.prepare = clk_prcmu_prepare, | 	.prepare = clk_prcmu_prepare, | ||||||
| 	.unprepare = clk_prcmu_unprepare, | 	.unprepare = clk_prcmu_unprepare, | ||||||
| 	.recalc_rate = clk_prcmu_recalc_rate, | 	.recalc_rate = clk_prcmu_recalc_rate, | ||||||
| 	.round_rate = clk_prcmu_round_rate, | 	.determine_rate = clk_prcmu_determine_rate, | ||||||
| 	.set_rate = clk_prcmu_set_rate, | 	.set_rate = clk_prcmu_set_rate, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | @ -169,7 +171,7 @@ static const struct clk_ops clk_prcmu_gate_ops = { | ||||||
| 
 | 
 | ||||||
| static const struct clk_ops clk_prcmu_scalable_rate_ops = { | static const struct clk_ops clk_prcmu_scalable_rate_ops = { | ||||||
| 	.recalc_rate = clk_prcmu_recalc_rate, | 	.recalc_rate = clk_prcmu_recalc_rate, | ||||||
| 	.round_rate = clk_prcmu_round_rate, | 	.determine_rate = clk_prcmu_determine_rate, | ||||||
| 	.set_rate = clk_prcmu_set_rate, | 	.set_rate = clk_prcmu_set_rate, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | @ -187,7 +189,7 @@ static const struct clk_ops clk_prcmu_opp_volt_scalable_ops = { | ||||||
| 	.prepare = clk_prcmu_opp_volt_prepare, | 	.prepare = clk_prcmu_opp_volt_prepare, | ||||||
| 	.unprepare = clk_prcmu_opp_volt_unprepare, | 	.unprepare = clk_prcmu_opp_volt_unprepare, | ||||||
| 	.recalc_rate = clk_prcmu_recalc_rate, | 	.recalc_rate = clk_prcmu_recalc_rate, | ||||||
| 	.round_rate = clk_prcmu_round_rate, | 	.determine_rate = clk_prcmu_determine_rate, | ||||||
| 	.set_rate = clk_prcmu_set_rate, | 	.set_rate = clk_prcmu_set_rate, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Brian Masney
						Brian Masney