Re: [PATCH 2.6.32] mfd: Always initialise WM831x IRQ mutex

From: Samuel Ortiz
Date: Mon Oct 19 2009 - 14:40:39 EST


Hi Mark,

On Mon, Oct 19, 2009 at 11:07:05AM +0100, Mark Brown wrote:
> This avoids crashes when running without interrupt support.
Thanks. I'll send a pull request with a couple more fixes in a few days.

Cheers,
Samuel.


> Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> ---
> drivers/mfd/wm831x-irq.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
> index d3015df..ac056ea 100644
> --- a/drivers/mfd/wm831x-irq.c
> +++ b/drivers/mfd/wm831x-irq.c
> @@ -507,6 +507,8 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
> {
> int i, ret;
>
> + mutex_init(&wm831x->irq_lock);
> +
> if (!irq) {
> dev_warn(wm831x->dev,
> "No interrupt specified - functionality limited\n");
> @@ -521,7 +523,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
> }
>
> wm831x->irq = irq;
> - mutex_init(&wm831x->irq_lock);
> INIT_WORK(&wm831x->irq_work, wm831x_irq_worker);
>
> /* Mask the individual interrupt sources */
> --
> 1.6.5
>

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/