Skip to content

Commit ac5b8e3

Browse files
committed
mxc: cec: Fix race in interrupt initialization
The interrupt handler schedules work in the work queue. Initialize the work queue before setting up the interrupt handler to avoid a Kernel panic on boot. Signed-off-by: Jon Nettleton <jon@solid-run.com>
1 parent 6a5f647 commit ac5b8e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/mxc/hdmi-cec/mxc_hdmi-cec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ static int hdmi_cec_dev_probe(struct platform_device *pdev)
532532
}
533533
spin_lock_init(&hdmi_cec_data.irq_lock);
534534

535+
INIT_DELAYED_WORK(&hdmi_cec_data.hdmi_cec_work, mxc_hdmi_cec_worker);
536+
535537
err = devm_request_irq(&pdev->dev, irq, mxc_hdmi_cec_isr, IRQF_SHARED,
536538
dev_name(&pdev->dev), &hdmi_cec_data);
537539
if (err < 0) {
@@ -567,7 +569,6 @@ static int hdmi_cec_dev_probe(struct platform_device *pdev)
567569
hdmi_cec_data.Logical_address = 15;
568570
hdmi_cec_data.tx_answer = CEC_TX_AVAIL;
569571
platform_set_drvdata(pdev, &hdmi_cec_data);
570-
INIT_DELAYED_WORK(&hdmi_cec_data.hdmi_cec_work, mxc_hdmi_cec_worker);
571572

572573
dev_info(&pdev->dev, "HDMI CEC initialized\n");
573574
goto out;

0 commit comments

Comments
 (0)