diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-10-19 11:07:05 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2009-10-27 00:20:32 +0100 |
commit | 14f572fa38c55fbe369127b808a4a79b0bbec367 (patch) | |
tree | 3fea2662caff0d56fa3e6234e5ad1a8d16ba67e3 /drivers | |
parent | 964fe080d94db82a3268443e9b9ece4c60246414 (diff) | |
download | linux-3.10-14f572fa38c55fbe369127b808a4a79b0bbec367.tar.gz linux-3.10-14f572fa38c55fbe369127b808a4a79b0bbec367.tar.bz2 linux-3.10-14f572fa38c55fbe369127b808a4a79b0bbec367.zip |
mfd: Always initialise WM831x IRQ mutex
This avoids crashes when running without interrupt support.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 d3015dfb913..ac056ea6b66 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 */ |