Commit 344fa0ba authored by Amit Kucheria's avatar Amit Kucheria Committed by Daniel Lezcano

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: 634e11d5 ("drivers: thermal: tsens: Add interrupt support")
Suggested-by: default avatarStephan Gerhold <stephan@gerhold.net>
Signed-off-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/cea3317c5d793db312064d68b261ad420a4a81b1.1576146898.git.amit.kucheria@linaro.org
parent c79f46a2
...@@ -110,6 +110,9 @@ static int tsens_register(struct tsens_priv *priv) ...@@ -110,6 +110,9 @@ static int tsens_register(struct tsens_priv *priv)
irq = platform_get_irq_byname(pdev, "uplow"); irq = platform_get_irq_byname(pdev, "uplow");
if (irq < 0) { if (irq < 0) {
ret = irq; ret = irq;
/* For old DTs with no IRQ defined */
if (irq == -ENXIO)
ret = 0;
goto err_put_device; goto err_put_device;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment