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

Configure Feed

Select the types of activity you want to include in your feed.

rtc: max31335: 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>
Link: https://lore.kernel.org/r/20250710-rtc-clk-round-rate-v1-10-33140bb2278e@redhat.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Brian Masney and committed by
Alexandre Belloni
9e0dfc79 e05d81b7

+7 -5
+7 -5
drivers/rtc/rtc-max31335.c
··· 497 497 return max31335_clkout_freq[reg & freq_mask]; 498 498 } 499 499 500 - static long max31335_clkout_round_rate(struct clk_hw *hw, unsigned long rate, 501 - unsigned long *prate) 500 + static int max31335_clkout_determine_rate(struct clk_hw *hw, 501 + struct clk_rate_request *req) 502 502 { 503 503 int index; 504 504 505 - index = find_closest(rate, max31335_clkout_freq, 505 + index = find_closest(req->rate, max31335_clkout_freq, 506 506 ARRAY_SIZE(max31335_clkout_freq)); 507 507 508 - return max31335_clkout_freq[index]; 508 + req->rate = max31335_clkout_freq[index]; 509 + 510 + return 0; 509 511 } 510 512 511 513 static int max31335_clkout_set_rate(struct clk_hw *hw, unsigned long rate, ··· 556 554 557 555 static const struct clk_ops max31335_clkout_ops = { 558 556 .recalc_rate = max31335_clkout_recalc_rate, 559 - .round_rate = max31335_clkout_round_rate, 557 + .determine_rate = max31335_clkout_determine_rate, 560 558 .set_rate = max31335_clkout_set_rate, 561 559 .enable = max31335_clkout_enable, 562 560 .disable = max31335_clkout_disable,