Skip to contentSkip to conversation

gpio: altera: change to platform_get_irq_optional to avoid false-positive error

PATCH In review Ooi, Joyce 2 participants 2 messages Jan 8, 2020 – Jan 9, 2020

Subsystems (2)
lore
Share & tools
lore

Ooi, Joyce

author
#0 lore raw

PATCH 1/1 gpio: altera: change to platform_get_irq_optional to avoid false-positive error

This patch switches to platform_get_irq_optional() from platform_get_irq() as it causes a false-positive error such as 'IRQ index 0 not found' when IRQ is not used. The IRQ usage is optional in this gpio-altera driver, so the error log is undesirable.

---
 drivers/gpio/gpio-altera.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-altera.c +1 -1
index 9f2e6b04c361..cc4ba71e4fe3 100644
@@ -266,7 +266,7 @@ static int altera_gpio_probe(struct platform_device *pdev)
 	altera_gc->mmchip.gc.owner		= THIS_MODULE;
 	altera_gc->mmchip.gc.parent		= &pdev->dev;
 
-	altera_gc->mapped_irq = platform_get_irq(pdev, 0);
+	altera_gc->mapped_irq = platform_get_irq_optional(pdev, 0);
 
 	if (altera_gc->mapped_irq < 0)
 		goto skip_irq;
Signature · 1 line
2.13.0
#1 lore raw

śr., 8 sty 2020 o 17:16 Ooi, Joyce <[email protected]> napisał(a):

Quoted 7 lines

This patch switches to platform_get_irq_optional() from platform_get_irq() as it causes a false-positive error such as 'IRQ index 0 not found' when IRQ is not used. The IRQ usage is optional in this gpio-altera driver, so the error log is undesirable.

Patch applied, thanks!

Bartosz