Commit 14f572fa authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

mfd: Always initialise WM831x IRQ mutex

This avoids crashes when running without interrupt support.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 964fe080
...@@ -507,6 +507,8 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq) ...@@ -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) ...@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment