Skip to contentSkip to conversation

watchdog: qcom: Use platform_get_irq_optional() for bark irq

PATCH In review Sai Prakash Ranjan 4 participants 4 messages Dec 13, 2019 – Dec 16, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: qcom: Use platform_get_irq_optional() for bark irq

platform_get_irq() prints an error message when the interrupt is not available. So on platforms where bark interrupt is not specified, following error message is observed on SDM845.

[    2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found

This is also seen on SC7180, SM8150 SoCs as well. Fix this by using platform_get_irq_optional() instead.

Fixes 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available")
---
 drivers/watchdog/qcom-wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/qcom-wdt.c +1 -1
index a494543d3ae1..eb47fe5ed280 100644
@@ -246,7 +246,7 @@ static int qcom_wdt_probe(struct platform_device *pdev)
 	}
 
 	/* check if there is pretimeout support */
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
 	if (irq > 0) {
 		ret = devm_request_irq(dev, irq, qcom_wdt_isr,
 				       IRQF_TRIGGER_RISING,
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Sai Prakash Ranjan

platform_get_irq() prints an error message when the interrupt is not available. So on platforms where bark interrupt is not specified, following error message is observed on SDM845.

[    2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found

This is also seen on SC7180, SM8150 SoCs as well. Fix this by using platform_get_irq_optional() instead.

Fixes 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available")
Quoted 20 lines
---
 drivers/watchdog/qcom-wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/qcom-wdt.c +1 -1
index a494543d3ae1..eb47fe5ed280 100644
@@ -246,7 +246,7 @@ static int qcom_wdt_probe(struct platform_device *pdev)
 	}
 
 	/* check if there is pretimeout support */
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
 	if (irq > 0) {
 		ret = devm_request_irq(dev, irq, qcom_wdt_isr,
 				       IRQF_TRIGGER_RISING,
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Sai Prakash Ranjan
Quoted 11 lines · Sai Prakash Ranjan

platform_get_irq() prints an error message when the interrupt is not available. So on platforms where bark interrupt is not specified, following error message is observed on SDM845.

[    2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found

This is also seen on SC7180, SM8150 SoCs as well. Fix this by using platform_get_irq_optional() instead.

Fixes 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available")
Quoted 18 lines
---
  drivers/watchdog/qcom-wdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/qcom-wdt.c +1 -1
index a494543d3ae1..eb47fe5ed280 100644
@@ -246,7 +246,7 @@ static int qcom_wdt_probe(struct platform_device *pdev)
  	}
 
  	/* check if there is pretimeout support */
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
  	if (irq > 0) {
  		ret = devm_request_irq(dev, irq, qcom_wdt_isr,
  				       IRQF_TRIGGER_RISING,
Reviewed-by on v1 1/1
#3 lore raw
In reply to Sai Prakash Ranjan

Quoting Sai Prakash Ranjan (2019-12-12 22:49:34)

Quoted 4 lines

platform_get_irq() prints an error message when the interrupt is not available. So on platforms where bark interrupt is not specified, following error message is observed on SDM845.

Quoted 8 lines
[    2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found

This is also seen on SC7180, SM8150 SoCs as well. Fix this by using platform_get_irq_optional() instead.

Fixes 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available")

---