summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/base/power/opp.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index c8a908b099c0..50b2831e027d 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -461,17 +461,6 @@ int opp_add(struct device *dev, unsigned long freq, unsigned long u_volt)
}
/**
- * opp_free_rcu() - helper to clear the struct opp when grace period has
- * elapsed without blocking the the caller of opp_set_availability
- */
-static void opp_free_rcu(struct rcu_head *head)
-{
- struct opp *opp = container_of(head, struct opp, head);
-
- kfree(opp);
-}
-
-/**
* opp_set_availability() - helper to set the availability of an opp
* @dev: device for which we do this operation
* @freq: OPP frequency to modify availability
@@ -542,7 +531,7 @@ static int opp_set_availability(struct device *dev, unsigned long freq,
list_replace_rcu(&opp->node, &new_opp->node);
mutex_unlock(&dev_opp_list_lock);
- call_rcu(&opp->head, opp_free_rcu);
+ kfree_rcu(opp, head);
/* Notify the change of the OPP availability */
if (availability_req)