• Viresh Kumar's avatar
    PM / OPP: Add light weight _opp_free() routine · 969fceb3
    Viresh Kumar authored
    The OPPs which are never successfully added using _opp_add() are not
    required to be freed with the _opp_remove() routine, as a simple kfree()
    is enough for them.
    
    Introduce a new light weight routine _opp_free(), which will do that.
    
    That also helps us removing the 'notify' parameter to _opp_remove(),
    which isn't required anymore.
    
    Note that _opp_free() contains a call to _remove_opp_table() as the OPP
    table might have been added for this very OPP only. The
    _remove_opp_table() routine returns quickly if there are more OPPs in
    the table. This will be simplified in later patches though.
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    969fceb3
core.c 54 KB