Commit 5a4f602b authored by Frank Xue's avatar Frank Xue Committed by Terry.Qiu

fixed the bug: host SUSPEND irq cause kernel panic

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.
Signed-off-by: default avatarTerry.Qiu <tqiu@neuros.com.cn>
parent 35bb380b
......@@ -1992,6 +1992,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
if (status < 0)
goto fail2;
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);
......@@ -2071,7 +2073,6 @@ fail:
return status;
}
INIT_WORK(&musb->irq_work, musb_irq_work);
#ifdef CONFIG_SYSFS
status = device_create_file(dev, &dev_attr_mode);
......
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