diff options
author | Amit Kucheria <[email protected]> | 2019-12-12 16:08:14 +0530 |
---|---|---|
committer | Daniel Lezcano <[email protected]> | 2020-01-07 08:22:35 +0100 |
commit | 344fa0bad6932204146d305607790340f2324a90 (patch) | |
tree | cb6e2ee1084b2bfe43d327024ab558020b37c179 | |
parent | c79f46a282390e0f5b306007bf7b11a46d529538 (diff) |
drivers: thermal: tsens: Work with old DTBs
In order for the old DTBs to continue working, the new interrupt code
must not return an error if interrupts are not defined. Don't return an
error in case of -ENXIO.
Fixes: 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support")
Suggested-by: Stephan Gerhold <[email protected]>
Signed-off-by: Amit Kucheria <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Tested-by: Bjorn Andersson <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/cea3317c5d793db312064d68b261ad420a4a81b1.1576146898.git.amit.kucheria@linaro.org
-rw-r--r-- | drivers/thermal/qcom/tsens.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 015e7d201598..0e7cf5236932 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -110,6 +110,9 @@ static int tsens_register(struct tsens_priv *priv) irq = platform_get_irq_byname(pdev, "uplow"); if (irq < 0) { ret = irq; + /* For old DTs with no IRQ defined */ + if (irq == -ENXIO) + ret = 0; goto err_put_device; } |