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 <bmas...@redhat.com>
---
 drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c 
b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
index 
191c282246d96e3f6c5a8d17abe078892882bf44..d010fec15671d33cc363af79e9f1c3f26ecb3464
 100644
--- a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
+++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
@@ -570,17 +570,20 @@ const struct phy_config 
*fsl_samsung_hdmi_phy_find_settings(struct fsl_samsung_h
        return fract_div_phy;
 }
 
-static long fsl_samsung_hdmi_phy_clk_round_rate(struct clk_hw *hw,
-                                               unsigned long rate, unsigned 
long *parent_rate)
+static int fsl_samsung_hdmi_phy_clk_determine_rate(struct clk_hw *hw,
+                                                  struct clk_rate_request *req)
 {
        struct fsl_samsung_hdmi_phy *phy = to_fsl_samsung_hdmi_phy(hw);
-       const struct phy_config *target_settings = 
fsl_samsung_hdmi_phy_find_settings(phy, rate);
+       const struct phy_config *target_settings = 
fsl_samsung_hdmi_phy_find_settings(phy,
+                                                                               
      req->rate);
 
        if (target_settings == NULL)
                return -EINVAL;
 
        dev_dbg(phy->dev, "round_rate, closest rate = %u\n", 
target_settings->pixclk);
-       return target_settings->pixclk;
+       req->rate = target_settings->pixclk;
+
+       return 0;
 }
 
 static int fsl_samsung_hdmi_phy_clk_set_rate(struct clk_hw *hw,
@@ -599,7 +602,7 @@ static int fsl_samsung_hdmi_phy_clk_set_rate(struct clk_hw 
*hw,
 
 static const struct clk_ops phy_clk_ops = {
        .recalc_rate = phy_clk_recalc_rate,
-       .round_rate = fsl_samsung_hdmi_phy_clk_round_rate,
+       .determine_rate = fsl_samsung_hdmi_phy_clk_determine_rate,
        .set_rate = fsl_samsung_hdmi_phy_clk_set_rate,
 };
 

-- 
2.50.0

Reply via email to