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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 7 Aug 2015 01:04:23 +0000 (03:04 +0200)
commit23dacf6d2e993551ef3ae0629baf6f473930513c
treefffea7fa07238b80fc700c512add403e8fdbd016
parentaa5f2f854f03e6dc3dec8874bbcff1452b4bc09e
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