Move IRQ workqueue init before request_irq, otherwise host SUSPEND irq
will call schedule_work() and BUG_ON() will fire because musb_irq_work did
not initialised.
We recorded it at
https://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_id=141&tracker_item_id=3740
Although the Blackfin port of MUSB is not merged, this bug should be
common for other platform with MUSB
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Gadiyar, Anand <gadiyar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
if (status < 0)
goto fail2;
+ /* Init IRQ workqueue before request_irq */
+ INIT_WORK(&musb->irq_work, musb_irq_work);
+
/* attach to the IRQ */
if (request_irq (nIrq, musb->isr, 0, dev->bus_id, musb)) {
dev_err(dev, "request_irq %d failed!\n", nIrq);
return status;
}
- INIT_WORK(&musb->irq_work, musb_irq_work);
-
#ifdef CONFIG_SYSFS
status = device_create_file(dev, &dev_attr_mode);
status = device_create_file(dev, &dev_attr_vbus);