2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-18 23:54:26 +08:00

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>
This commit is contained in:
Mark Brown 2009-10-19 11:07:05 +01:00 committed by Samuel Ortiz
parent 964fe080d9
commit 14f572fa38

View File

@ -507,6 +507,8 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
{ {
int i, ret; int i, ret;
mutex_init(&wm831x->irq_lock);
if (!irq) { if (!irq) {
dev_warn(wm831x->dev, dev_warn(wm831x->dev,
"No interrupt specified - functionality limited\n"); "No interrupt specified - functionality limited\n");
@ -521,7 +523,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
} }
wm831x->irq = irq; wm831x->irq = irq;
mutex_init(&wm831x->irq_lock);
INIT_WORK(&wm831x->irq_work, wm831x_irq_worker); INIT_WORK(&wm831x->irq_work, wm831x_irq_worker);
/* Mask the individual interrupt sources */ /* Mask the individual interrupt sources */