Skip to contentSkip to conversation

watchdog: orion: fix platform_get_irq() complaints

PATCH In review Russell King 3 participants 3 messages Nov 29, 2019 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: orion: fix platform_get_irq() complaints

Fix:

orion_wdt f1020300.watchdog: IRQ index 1 not found

which is caused by platform_get_irq() now complaining when optional IRQs are not found. Neither interrupt for orion is required, so make them both optional.

---
 drivers/watchdog/orion_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/orion_wdt.c +2 -2
index 1cccf8eb1c5d..8e6dfe76f9c9 100644
@@ -602,7 +602,7 @@ static int orion_wdt_probe(struct platform_device *pdev)
 		set_bit(WDOG_HW_RUNNING, &dev->wdt.status);
 
 	/* Request the IRQ only after the watchdog is disabled */
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
 	if (irq > 0) {
 		/*
 		 * Not all supported platforms specify an interrupt for the
@@ -617,7 +617,7 @@ static int orion_wdt_probe(struct platform_device *pdev)
 	}
 
 	/* Optional 2nd interrupt for pretimeout */
-	irq = platform_get_irq(pdev, 1);
+	irq = platform_get_irq_optional(pdev, 1);
 	if (irq > 0) {
 		orion_wdt_info.options |= WDIOF_PRETIMEOUT;
 		ret = devm_request_irq(&pdev->dev, irq, orion_wdt_pre_irq,
Signature · 1 line
2.20.1
#1 lore raw
Quoted 9 lines · Russell King

Fix:

orion_wdt f1020300.watchdog: IRQ index 1 not found

which is caused by platform_get_irq() now complaining when optional IRQs are not found. Neither interrupt for orion is required, so make them both optional.

Note that it's a tad difficult to add an accurate Fixes: tag here because the commit introducing the error message (7723f4c5ecdb) is earlier than the commit introducing the functions to work around it.

Quoted 30 lines
---
 drivers/watchdog/orion_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/orion_wdt.c +2 -2
index 1cccf8eb1c5d..8e6dfe76f9c9 100644
@@ -602,7 +602,7 @@ static int orion_wdt_probe(struct platform_device *pdev)
 		set_bit(WDOG_HW_RUNNING, &dev->wdt.status);
 
 	/* Request the IRQ only after the watchdog is disabled */
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
 	if (irq > 0) {
 		/*
 		 * Not all supported platforms specify an interrupt for the
@@ -617,7 +617,7 @@ static int orion_wdt_probe(struct platform_device *pdev)
 	}
 
 	/* Optional 2nd interrupt for pretimeout */
-	irq = platform_get_irq(pdev, 1);
+	irq = platform_get_irq_optional(pdev, 1);
 	if (irq > 0) {
 		orion_wdt_info.options |= WDIOF_PRETIMEOUT;
 		ret = devm_request_irq(&pdev->dev, irq, orion_wdt_pre_irq,
Signature · 1 line
2.20.1
Signature · 3 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Russell King
Quoted 9 lines · Russell King

Fix:

orion_wdt f1020300.watchdog: IRQ index 1 not found

which is caused by platform_get_irq() now complaining when optional IRQs are not found. Neither interrupt for orion is required, so make them both optional.

Quoted 27 lines
---
  drivers/watchdog/orion_wdt.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/orion_wdt.c +2 -2
index 1cccf8eb1c5d..8e6dfe76f9c9 100644
@@ -602,7 +602,7 @@ static int orion_wdt_probe(struct platform_device *pdev)
  		set_bit(WDOG_HW_RUNNING, &dev->wdt.status);
 
  	/* Request the IRQ only after the watchdog is disabled */
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
  	if (irq > 0) {
  		/*
  		 * Not all supported platforms specify an interrupt for the
@@ -617,7 +617,7 @@ static int orion_wdt_probe(struct platform_device *pdev)
  	}
 
  	/* Optional 2nd interrupt for pretimeout */
-	irq = platform_get_irq(pdev, 1);
+	irq = platform_get_irq_optional(pdev, 1);
  	if (irq > 0) {
  		orion_wdt_info.options |= WDIOF_PRETIMEOUT;
  		ret = devm_request_irq(&pdev->dev, irq, orion_wdt_pre_irq,