PM / OPP: Break _opp_add_dynamic() into smaller functions
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 29 Jul 2015 10:53:01 +0000 (16:23 +0530)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 4 Sep 2017 05:33:33 +0000 (14:33 +0900)
commita02bcb2456e0d6573af4ebfedd154d0e41eab4ec
tree2bcbbb1073f50a442c66dfe4891c4f49e5562bca
parent5471fd95c79713740e0ad876f939dc2e9208362f
PM / OPP: Break _opp_add_dynamic() into smaller functions

Later commits would add support for new OPP bindings and this would be
required then. So, lets do it in a separate patch to make it easily
reviewable.

Another change worth noticing is INIT_LIST_HEAD(&opp->node). We weren't
doing it earlier as we never tried to delete a list node before it is
added to list. But this wouldn't be the case anymore. We might try to
delete a node (just to reuse the same code paths), without it being
getting added to the list.

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