Skip to content

Commit 23f6160

Browse files
SirSireeshgregkh
authored andcommitted
remoteproc: qcom: wcnss: Fix handling of IRQs
[ Upstream commit bed0adac1ded4cb486ba19a3a7e730fbd9a1c9c6 ] The wcnss_get_irq function is expected to return a value > 0 in the event that an IRQ is succssfully obtained, but it instead returns 0. This causes the stop and ready IRQs to never actually be used despite being defined in the device-tree. This patch fixes that. Fixes: aed361a ("remoteproc: qcom: Introduce WCNSS peripheral image loader") Signed-off-by: Sireesh Kodali <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent e1e3b65 commit 23f6160

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/remoteproc/qcom_wcnss.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss,
418418
irq_handler_t thread_fn)
419419
{
420420
int ret;
421+
int irq_number;
421422

422423
ret = platform_get_irq_byname(pdev, name);
423424
if (ret < 0 && optional) {
@@ -428,14 +429,19 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss,
428429
return ret;
429430
}
430431

432+
irq_number = ret;
433+
431434
ret = devm_request_threaded_irq(&pdev->dev, ret,
432435
NULL, thread_fn,
433436
IRQF_TRIGGER_RISING | IRQF_ONESHOT,
434437
"wcnss", wcnss);
435-
if (ret)
438+
if (ret) {
436439
dev_err(&pdev->dev, "request %s IRQ failed\n", name);
440+
return ret;
441+
}
437442

438-
return ret;
443+
/* Return the IRQ number if the IRQ was successfully acquired */
444+
return irq_number;
439445
}
440446

441447
static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss)

0 commit comments

Comments
 (0)