devfreq: tegra30: Migrate to dev_pm_opp_set_opp()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 21 Jan 2021 09:57:55 +0000 (15:27 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 2 Feb 2021 05:00:53 +0000 (10:30 +0530)
dev_pm_opp_set_bw() is getting removed and dev_pm_opp_set_opp() should
be used instead. Migrate to the new API.

We don't want the OPP core to manage the clk for this driver, migrate to
dev_pm_opp_of_add_table_noclk() to make sure dev_pm_opp_set_opp()
doesn't have any side effects.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
drivers/devfreq/tegra30-devfreq.c

index 117cad7..ce83f88 100644 (file)
@@ -647,7 +647,7 @@ static int tegra_devfreq_target(struct device *dev, unsigned long *freq,
                return PTR_ERR(opp);
        }
 
-       ret = dev_pm_opp_set_bw(dev, opp);
+       ret = dev_pm_opp_set_opp(dev, opp);
        dev_pm_opp_put(opp);
 
        return ret;
@@ -849,7 +849,7 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
                return err;
        }
 
-       err = dev_pm_opp_of_add_table(&pdev->dev);
+       err = dev_pm_opp_of_add_table_noclk(&pdev->dev, 0);
        if (err) {
                dev_err(&pdev->dev, "Failed to add OPP table: %d\n", err);
                goto put_hw;