[PATCH] clk: remove clock notifier at unregister

Mike Turquette mturquette at linaro.org
Mon May 6 18:41:26 EDT 2013


Quoting David Andrey (2013-04-22 05:22:41)
> Clock notifier node is now removed from the
> notifier list during unregister
> 
> Signed-off-by: David Andrey <david.andrey at netmodule.com>
> Acked-by: Martin Meuli <martin.meuli at netmodule.com>

This looks good.  I'll take it in after -rc1 comes out.

Thanks,
Mike

> ---
>  drivers/clk/clk.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 20ce67f..eb66434 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1941,7 +1941,10 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
>  
>                 /* XXX the notifier code should handle this better */
>                 if (!cn->notifier_head.head) {
> +                       if (clk->notifier_count)
> +                               BUG();
>                         srcu_cleanup_notifier_head(&cn->notifier_head);
> +                       list_del(&cn->node);
>                         kfree(cn);
>                 }
>  
> -- 
> 1.7.4.1



More information about the linux-arm-kernel mailing list