Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firmware: imx: scu-irq: Init workqueue before request mbox channel

With mailbox channel requested, there is possibility that interrupts may
come in, so need to make sure the workqueue is initialized before
the queue is scheduled by mailbox rx callback.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>

authored by

Peng Fan and committed by
Shawn Guo
81fb53fe 62c740fb

+2 -2
+2 -2
drivers/firmware/imx/imx-scu-irq.c
··· 214 214 cl->dev = dev; 215 215 cl->rx_callback = imx_scu_irq_callback; 216 216 217 + INIT_WORK(&imx_sc_irq_work, imx_scu_irq_work_handler); 218 + 217 219 /* SCU general IRQ uses general interrupt channel 3 */ 218 220 ch = mbox_request_channel_byname(cl, "gip3"); 219 221 if (IS_ERR(ch)) { ··· 223 221 dev_err(dev, "failed to request mbox chan gip3, ret %d\n", ret); 224 222 goto free_cl; 225 223 } 226 - 227 - INIT_WORK(&imx_sc_irq_work, imx_scu_irq_work_handler); 228 224 229 225 if (!of_parse_phandle_with_args(dev->of_node, "mboxes", 230 226 "#mbox-cells", 0, &spec)) {