• Viresh Kumar's avatar
    PM / OPP Introduce APIs to remove OPPs · 129eec55
    Viresh Kumar authored
    OPPs are created statically (from DT) or dynamically. Currently we don't free
    OPPs that are created statically, when the module unloads. And so if the module
    is inserted back again, we get warning for duplicate OPPs as the same were
    already present.
    
    Also, there might be a need to remove dynamic OPPs in future and so API for that
    is also added.
    
    This patch adds helper APIs to remove/free existing static and dynamic OPPs.
    
    Because the OPPs are used both under RCU and SRCU, we have to wait for grace
    period of both. And so are using kfree_rcu() from within call_srcu().
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    129eec55
opp.c 23.6 KB