PM / OPP: reuse of_parse_phandle()
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 4 Sep 2015 08:17:22 +0000 (13:47 +0530)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 4 Sep 2017 05:33:35 +0000 (14:33 +0900)
commit067a092596cb4e228fdcb1cbd68925dc2a1ba3ee
treec45197a4f32d02111c74079aca628810b822ae0b
parentace8075cffe96f76fd4e6d7cd7dcad3440cd638e
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