On Sunday 25 January 2009, David Brownell wrote:
>  static void __clk_disable(struct clk *clk)
>  {
> -       if (clk->usecount)
> -               return;
> -
> -       davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, clk->lpsc, 0);
> +       BUG_ON(clk->usecount == 0);

Nitpicking my tweaks:  that should be

        if (WARN_ON(clk->usecount == 0))
                return;

Because if there's a way to continue running ("return" here),
then BUG() variants are the wrong answer.  :)


> +       if (--clk->usecount == 0 && !(clk->flags & CLK_PLL))
> +               davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, clk->lpsc, 0);
> +       if (clk->parent)
> +               __clk_disable(clk->parent);
>  }
>  



_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to