diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-09-05 16:17:14 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2018-09-19 14:56:41 -0700 |
commit | eb7c8743d6cf489e30091e6656fd4d3306621e9a (patch) | |
tree | 291da2bacbf57a1214f0082d2ed06a8b5cfc2c69 /drivers/opp/of.c | |
parent | 3d2556992a878a2210d3be498416aee39e0c32aa (diff) | |
download | linux-eb7c8743d6cf489e30091e6656fd4d3306621e9a.tar.bz2 |
OPP: Pass index to _of_init_opp_table()
This is a preparatory patch required for the next commit which will
start using OPP table's node pointer in _of_init_opp_table(), which
requires the index in order to read the OPP table's phandle.
This commit adds the index argument in the call chains in order to get
it delivered to _of_init_opp_table().
Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/of.c')
-rw-r--r-- | drivers/opp/of.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 86222586f27b..1a9e1242a2a7 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -52,7 +52,8 @@ static struct opp_table *_managed_opp(const struct device_node *np) return managed_table; } -void _of_init_opp_table(struct opp_table *opp_table, struct device *dev) +void _of_init_opp_table(struct opp_table *opp_table, struct device *dev, + int index) { struct device_node *np; @@ -378,7 +379,8 @@ free_opp: } /* Initializes OPP tables based on new bindings */ -static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np) +static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np, + int index) { struct device_node *np; struct opp_table *opp_table; @@ -393,7 +395,7 @@ static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np) goto put_opp_table; } - opp_table = dev_pm_opp_get_opp_table(dev); + opp_table = dev_pm_opp_get_opp_table_indexed(dev, index); if (!opp_table) return -ENOMEM; @@ -526,7 +528,7 @@ int dev_pm_opp_of_add_table(struct device *dev) return _of_add_opp_table_v1(dev); } - ret = _of_add_opp_table_v2(dev, opp_np); + ret = _of_add_opp_table_v2(dev, opp_np, 0); of_node_put(opp_np); return ret; @@ -574,7 +576,7 @@ again: return -ENODEV; } - ret = _of_add_opp_table_v2(dev, opp_np); + ret = _of_add_opp_table_v2(dev, opp_np, index); of_node_put(opp_np); return ret; |