mirror of https://github.com/torvalds/linux.git
clk: gemini: 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
b87d7e655a
commit
2ffdd7fbf7
|
|
@ -126,13 +126,16 @@ static unsigned long gemini_pci_recalc_rate(struct clk_hw *hw,
|
|||
return 33000000;
|
||||
}
|
||||
|
||||
static long gemini_pci_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *prate)
|
||||
static int gemini_pci_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
/* We support 33 and 66 MHz */
|
||||
if (rate < 48000000)
|
||||
return 33000000;
|
||||
return 66000000;
|
||||
if (req->rate < 48000000)
|
||||
req->rate = 33000000;
|
||||
else
|
||||
req->rate = 66000000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gemini_pci_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
|
|
@ -179,7 +182,7 @@ static int gemini_pci_is_enabled(struct clk_hw *hw)
|
|||
|
||||
static const struct clk_ops gemini_pci_clk_ops = {
|
||||
.recalc_rate = gemini_pci_recalc_rate,
|
||||
.round_rate = gemini_pci_round_rate,
|
||||
.determine_rate = gemini_pci_determine_rate,
|
||||
.set_rate = gemini_pci_set_rate,
|
||||
.enable = gemini_pci_enable,
|
||||
.disable = gemini_pci_disable,
|
||||
|
|
|
|||
Loading…
Reference in New Issue