Calling disable_irq() right after devm_request_irq() is a bad practice.
it leaves a small window when the driver doesn't expect the IRQ, but the
hardware still can trigger it. Use the IRQF_NO_AUTOEN flag to prevent
the request_irq from enabling the IRQ line.

Signed-off-by: Dmitry Baryshkov <dmitry.barysh...@linaro.org>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c 
b/drivers/gpu/drm/msm/dp/dp_display.c
index bfd0aeff3f0d..3173e6962a78 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1251,13 +1251,12 @@ int dp_display_request_irq(struct msm_dp *dp_display)
 
        rc = devm_request_irq(&dp->pdev->dev, dp->irq,
                        dp_display_irq_handler,
-                       IRQF_TRIGGER_HIGH, "dp_display_isr", dp);
+                       IRQF_TRIGGER_HIGH | IRQF_NO_AUTOEN, "dp_display_isr", 
dp);
        if (rc < 0) {
                DRM_ERROR("failed to request IRQ%u: %d\n",
                                dp->irq, rc);
                return rc;
        }
-       disable_irq(dp->irq);
 
        return 0;
 }
-- 
2.35.1

Reply via email to