]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
PM / OPP Introduce APIs to remove OPPs
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 27 Nov 2014 03:24:06 +0000 (08:54 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 29 Nov 2014 22:53:20 +0000 (23:53 +0100)
commit129eec55df6ab1b5ecdd89fd7db7a2cd103200b5
tree2e9bae88e582e9a8f883dd6029802641c1fab93d
parent38393409da345cd48d94a0e74c7bbc3402742882
PM / OPP Introduce APIs to remove OPPs

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: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp.c
include/linux/pm_opp.h