lkml.org 
[lkml]   [2014]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] PM / OPP: Implement opp_remove and free_opp_table functions
From
On 21 May 2014 11:21, Inderpal Singh <inderpal.s@samsung.com> wrote:
> At the driver unloading time the associated opps and its table may need
> to be deleted. Otherwise it amounts to memory leak. The existing
> OPP library does not have provision to do so.
>
> Hence this patch implements the required functions to free the same.
>
> Signed-off-by: Inderpal Singh <inderpal.s@samsung.com>
> ---
> Changes in v2:
> - As suggested by Nishanth, added support to remove a single OPP
> for non-DT users
> - Added an internal helper function to avoid the code duplication
> between opp_remove and free_opp_table functions
>
> drivers/base/power/opp.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++-
> include/linux/pm_opp.h | 14 +++++-
> 2 files changed, 134 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
> index faae9cf..22adef3 100644
> --- a/drivers/base/power/opp.c
> +++ b/drivers/base/power/opp.c
> @@ -89,6 +89,7 @@ struct device_opp {
> struct device *dev;
> struct srcu_notifier_head head;
> struct list_head opp_list;
> + struct rcu_head head_rcu;

This isn't used ...

> };
>
> /*
> @@ -427,7 +428,6 @@ int dev_pm_opp_add(struct device *dev, unsigned long freq, unsigned long u_volt)
> __func__);
> return -ENOMEM;
> }
> -

Unrelated change.


\
 
 \ /
  Last update: 2014-05-21 10:21    [W:1.050 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site