Skip to content

Commit 14480e8

Browse files
Tian Taomchehab
authored andcommitted
media: camss: move to use request_irq by IRQF_NO_AUTOEN flag
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which is being merged: https://lore.kernel.org/patchwork/patch/1388765/ Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Reviewed-by: Robert Foss <robert.foss@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent be6cdcf commit 14480e8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

drivers/media/platform/qcom/camss/camss-csid.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,14 +581,13 @@ int msm_csid_subdev_init(struct camss *camss, struct csid_device *csid,
581581
snprintf(csid->irq_name, sizeof(csid->irq_name), "%s_%s%d",
582582
dev_name(dev), MSM_CSID_NAME, csid->id);
583583
ret = devm_request_irq(dev, csid->irq, csid->ops->isr,
584-
IRQF_TRIGGER_RISING, csid->irq_name, csid);
584+
IRQF_TRIGGER_RISING | IRQF_NO_AUTOEN,
585+
csid->irq_name, csid);
585586
if (ret < 0) {
586587
dev_err(dev, "request_irq failed: %d\n", ret);
587588
return ret;
588589
}
589590

590-
disable_irq(csid->irq);
591-
592591
/* Clocks */
593592

594593
csid->nclocks = 0;

drivers/media/platform/qcom/camss/camss-csiphy.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,14 +617,13 @@ int msm_csiphy_subdev_init(struct camss *camss,
617617
dev_name(dev), MSM_CSIPHY_NAME, csiphy->id);
618618

619619
ret = devm_request_irq(dev, csiphy->irq, csiphy->ops->isr,
620-
IRQF_TRIGGER_RISING, csiphy->irq_name, csiphy);
620+
IRQF_TRIGGER_RISING | IRQF_NO_AUTOEN,
621+
csiphy->irq_name, csiphy);
621622
if (ret < 0) {
622623
dev_err(dev, "request_irq failed: %d\n", ret);
623624
return ret;
624625
}
625626

626-
disable_irq(csiphy->irq);
627-
628627
/* Clocks */
629628

630629
csiphy->nclocks = 0;

0 commit comments

Comments
 (0)