Skip to contentSkip to conversation

dmaengine: pxa_dma: use platform_get_irq_optional

PATCH Applied Doug Brown 2 participants 2 messages Sep 6, 2022 – Oct 19, 2022

Subsystems (2)
lore
Share & tools
lore

Doug Brown

author
#0 lore raw

PATCH 1/1 dmaengine: pxa_dma: use platform_get_irq_optional

The first IRQ is required, but IRQs 1 through (nb_phy_chans - 1) are optional, because on some platforms (e.g. PXA168) there is a single IRQ shared between all channels.

This change inhibits a flood of "IRQ index # not found" messages at startup. Tested on a PXA168-based device.

Fixes 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()"
---
 drivers/dma/pxa_dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/pxa_dma.c +2 -2
index e7034f6f3994..22a392fe6d32 100644
@@ -1247,14 +1247,14 @@ static int pxad_init_phys(struct platform_device *op,
 		return -ENOMEM;
 
 	for (i = 0; i < nb_phy_chans; i++)
-		if (platform_get_irq(op, i) > 0)
+		if (platform_get_irq_optional(op, i) > 0)
 			nr_irq++;
 
 	for (i = 0; i < nb_phy_chans; i++) {
 		phy = &pdev->phys[i];
 		phy->base = pdev->base;
 		phy->idx = i;
-		irq = platform_get_irq(op, i);
+		irq = platform_get_irq_optional(op, i);
 		if ((nr_irq > 1) && (irq > 0))
 			ret = devm_request_irq(&op->dev, irq,
 					       pxad_chan_handler,
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Doug Brown

The first IRQ is required, but IRQs 1 through (nb_phy_chans - 1) are optional, because on some platforms (e.g. PXA168) there is a single IRQ shared between all channels.

This change inhibits a flood of "IRQ index # not found" messages at startup. Tested on a PXA168-based device.

Applied, thanks

Signature · 1 line
~Vinod