diff options
| author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-05-21 19:39:15 -0400 |
|---|---|---|
| committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-05-21 20:24:00 -0400 |
| commit | f4c428cfe427e4c5ea6dc47c6fbbfee2b13b31e0 (patch) | |
| tree | b6512bba1035d12edfef3ff4910fa2167190aa40 | |
| parent | 826950868cd81268913a91b69f00fb6c3f0b6f5b (diff) | |
remoteproc: q6v5: Return irq from q6v5_request_irq()
q6v5_request_irq() was supposed to return the irq number, but ret is
overwritten by the request_irq(), fix this and return the IRQ on
success.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
| -rw-r--r-- | drivers/remoteproc/qcom_q6v5_pil.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c index 56b14c27e275..3736e8608c69 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c | |||
| @@ -1049,22 +1049,23 @@ static int q6v5_request_irq(struct q6v5 *qproc, | |||
| 1049 | const char *name, | 1049 | const char *name, |
| 1050 | irq_handler_t thread_fn) | 1050 | irq_handler_t thread_fn) |
| 1051 | { | 1051 | { |
| 1052 | int irq; | ||
| 1052 | int ret; | 1053 | int ret; |
| 1053 | 1054 | ||
| 1054 | ret = platform_get_irq_byname(pdev, name); | 1055 | irq = platform_get_irq_byname(pdev, name); |
| 1055 | if (ret < 0) { | 1056 | if (irq < 0) { |
| 1056 | dev_err(&pdev->dev, "no %s IRQ defined\n", name); | 1057 | dev_err(&pdev->dev, "no %s IRQ defined\n", name); |
| 1057 | return ret; | 1058 | return irq; |
| 1058 | } | 1059 | } |
| 1059 | 1060 | ||
| 1060 | ret = devm_request_threaded_irq(&pdev->dev, ret, | 1061 | ret = devm_request_threaded_irq(&pdev->dev, irq, |
| 1061 | NULL, thread_fn, | 1062 | NULL, thread_fn, |
| 1062 | IRQF_TRIGGER_RISING | IRQF_ONESHOT, | 1063 | IRQF_TRIGGER_RISING | IRQF_ONESHOT, |
| 1063 | "q6v5", qproc); | 1064 | "q6v5", qproc); |
| 1064 | if (ret) | 1065 | if (ret) |
| 1065 | dev_err(&pdev->dev, "request %s IRQ failed\n", name); | 1066 | dev_err(&pdev->dev, "request %s IRQ failed\n", name); |
| 1066 | 1067 | ||
| 1067 | return ret; | 1068 | return ret ? : irq; |
| 1068 | } | 1069 | } |
| 1069 | 1070 | ||
| 1070 | static int q6v5_alloc_memory_region(struct q6v5 *qproc) | 1071 | static int q6v5_alloc_memory_region(struct q6v5 *qproc) |
