i2c: qup: 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. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
8e98c4f5c3
commit
5fe058b04d
|
@ -1797,12 +1797,12 @@ nodma:
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
ret = devm_request_irq(qup->dev, qup->irq, qup_i2c_interrupt,
|
ret = devm_request_irq(qup->dev, qup->irq, qup_i2c_interrupt,
|
||||||
IRQF_TRIGGER_HIGH, "i2c_qup", qup);
|
IRQF_TRIGGER_HIGH | IRQF_NO_AUTOEN,
|
||||||
|
"i2c_qup", qup);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(qup->dev, "Request %d IRQ failed\n", qup->irq);
|
dev_err(qup->dev, "Request %d IRQ failed\n", qup->irq);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
disable_irq(qup->irq);
|
|
||||||
|
|
||||||
hw_ver = readl(qup->base + QUP_HW_VERSION);
|
hw_ver = readl(qup->base + QUP_HW_VERSION);
|
||||||
dev_dbg(qup->dev, "Revision %x\n", hw_ver);
|
dev_dbg(qup->dev, "Revision %x\n", hw_ver);
|
||||||
|
|
Loading…
Reference in New Issue