summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorSai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>2019-12-13 12:19:34 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-14 16:34:12 -0500
commit2de1af2bcba06b97583121d9739ba9e5f5d89f49 (patch)
treec541c062f00a17240610a7b42ec16c29640fbddd /drivers/watchdog
parentf599ae7529e63ce597e21155c116e78926f3b7e3 (diff)
downloadlinux-2de1af2bcba06b97583121d9739ba9e5f5d89f49.tar.gz
linux-2de1af2bcba06b97583121d9739ba9e5f5d89f49.tar.bz2
linux-2de1af2bcba06b97583121d9739ba9e5f5d89f49.zip
watchdog: qcom: Use platform_get_irq_optional() for bark irq
commit e0b4f4e0cf7fa9d62628d4249c765ec18dffd143 upstream. 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") Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20191213064934.4112-1-saiprakash.ranjan@codeaurora.org Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/qcom-wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
index a494543d3ae1..eb47fe5ed280 100644
--- a/drivers/watchdog/qcom-wdt.c
+++ b/drivers/watchdog/qcom-wdt.c
@@ -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,