Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: si544: 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.

Signed-off-by: Brian Masney <bmasney@redhat.com>

+5 -5
+5 -5
drivers/clk/clk-si544.c
··· 307 307 return si544_calc_rate(&settings); 308 308 } 309 309 310 - static long si544_round_rate(struct clk_hw *hw, unsigned long rate, 311 - unsigned long *parent_rate) 310 + static int si544_determine_rate(struct clk_hw *hw, 311 + struct clk_rate_request *req) 312 312 { 313 313 struct clk_si544 *data = to_clk_si544(hw); 314 314 315 - if (!is_valid_frequency(data, rate)) 315 + if (!is_valid_frequency(data, req->rate)) 316 316 return -EINVAL; 317 317 318 318 /* The accuracy is less than 1 Hz, so any rate is possible */ 319 - return rate; 319 + return 0; 320 320 } 321 321 322 322 /* Calculates the maximum "small" change, 950 * rate / 1000000 */ ··· 408 408 .unprepare = si544_unprepare, 409 409 .is_prepared = si544_is_prepared, 410 410 .recalc_rate = si544_recalc_rate, 411 - .round_rate = si544_round_rate, 411 + .determine_rate = si544_determine_rate, 412 412 .set_rate = si544_set_rate, 413 413 }; 414 414