[RFC,PATCH 1/3] Add a common struct clk

Colin Cross ccross at google.com
Mon Feb 7 14:59:26 EST 2011


On Sun, Feb 6, 2011 at 10:07 PM, Jeremy Kerr <jeremy.kerr at canonical.com> wrote:
<snip>

> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> new file mode 100644
> index 0000000..12e0daf
> --- /dev/null
> +++ b/drivers/clk/clk.c

<snip>

> +int clk_enable(struct clk *clk)
> +{
> +       int ret = 0;
> +
> +       if (!clk->ops->enable)
> +               return 0;
> +
> +       spin_lock(&clk->enable_lock);

spin_lock_irqsave/spin_unlock_irqrestore.  This could get called with
irqs on or off.



More information about the linux-arm-kernel mailing list