diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2022-05-25 17:00:51 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2022-06-15 10:53:02 +0530 |
commit | 7ba371cde03e0bfdb0624a03f7844c8630f0f582 (patch) | |
tree | e50a25c3666a5f7d41c9c66315c48a0837e8687e | |
parent | ce9e5656ee2d900f86e39dd34047df33ee1f4b2e (diff) | |
download | linux-next-7ba371cde03e0bfdb0624a03f7844c8630f0f582.tar.gz |
memory: tegra: Migrate to dev_pm_opp_set_config()
The OPP core now provides a unified API for setting all configuration
types, i.e. dev_pm_opp_set_config().
Lets start using it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rw-r--r-- | drivers/memory/tegra/tegra124-emc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c index 908f8d5392b2..d1e8f9ffef63 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -1395,13 +1395,17 @@ err_msg: static int tegra_emc_opp_table_init(struct tegra_emc *emc) { u32 hw_version = BIT(tegra_sku_info.soc_speedo_id); - struct opp_table *hw_opp_table; + struct opp_table *opp_table; int err; + struct dev_pm_opp_config config = { + .supported_hw = &hw_version, + .supported_hw_count = 1, + }; - hw_opp_table = dev_pm_opp_set_supported_hw(emc->dev, &hw_version, 1); - err = PTR_ERR_OR_ZERO(hw_opp_table); + opp_table = dev_pm_opp_set_config(emc->dev, &config); + err = PTR_ERR_OR_ZERO(opp_table); if (err) { - dev_err(emc->dev, "failed to set OPP supported HW: %d\n", err); + dev_err(emc->dev, "failed to set OPP config: %d\n", err); return err; } @@ -1430,7 +1434,7 @@ static int tegra_emc_opp_table_init(struct tegra_emc *emc) remove_table: dev_pm_opp_of_remove_table(emc->dev); put_hw_table: - dev_pm_opp_put_supported_hw(hw_opp_table); + dev_pm_opp_clear_config(opp_table); return err; } |