remoteproc: ingenic: Request IRQ disabled
The ingenic remoteproc driver requests its IRQ and then immediately disables it. The disable is necessary since irq_request() normally enables the IRQ. But there is a new flag IRQF_NO_AUTOEN that when specified keeps the IRQ disabled. Use this new flag rather than calling disable_irq(). This slightly reduce the boilerplate code and also avoids a theoretical race condition where the IRQ could fire between irq_request() and disable_irq(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20211205111349.51213-1-lars@metafoo.de Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
parent
b20dc021ba
commit
c768968f13
1 changed files with 2 additions and 3 deletions
|
@ -218,14 +218,13 @@ static int ingenic_rproc_probe(struct platform_device *pdev)
|
||||||
if (vpu->irq < 0)
|
if (vpu->irq < 0)
|
||||||
return vpu->irq;
|
return vpu->irq;
|
||||||
|
|
||||||
ret = devm_request_irq(dev, vpu->irq, vpu_interrupt, 0, "VPU", rproc);
|
ret = devm_request_irq(dev, vpu->irq, vpu_interrupt, IRQF_NO_AUTOEN,
|
||||||
|
"VPU", rproc);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(dev, "Failed to request IRQ\n");
|
dev_err(dev, "Failed to request IRQ\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_irq(vpu->irq);
|
|
||||||
|
|
||||||
ret = devm_rproc_add(dev, rproc);
|
ret = devm_rproc_add(dev, rproc);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Failed to register remote processor\n");
|
dev_err(dev, "Failed to register remote processor\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue