PM / OPP: reuse of_parse_phandle()
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 4 Sep 2015 08:17:22 +0000 (13:47 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 15 Sep 2015 00:03:15 +0000 (02:03 +0200)
commit1840995c52d44bec8c20d6c07a706dc1499da9da
tree7272d7d285eadaa307a25d8c8069fa852817e64f
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f
PM / OPP: reuse of_parse_phandle()

We already have a better API to get the opp descriptor block's node from
cpu-node. Lets reuse that instead of creating our own routines for the
same stuff. That cleans the code a lot.

This also kills a check we had earlier (as we are using the generic API
now). Earlier we used to check if the operating-points-v2 property
contained multiple phandles instead of a single phandle.

Killing this check isn't an issue because, we only parse the first entry
with of_parse_phandle(). So, if a user passes multiple phandles, its
really his problem :)

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp.c