Skip to content

Commit 344fa0b

Browse files
idlethreaddlezcano
authored andcommitted
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: 634e11d ("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
1 parent c79f46a commit 344fa0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/thermal/qcom/tsens.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ static int tsens_register(struct tsens_priv *priv)
110110
irq = platform_get_irq_byname(pdev, "uplow");
111111
if (irq < 0) {
112112
ret = irq;
113+
/* For old DTs with no IRQ defined */
114+
if (irq == -ENXIO)
115+
ret = 0;
113116
goto err_put_device;
114117
}
115118

0 commit comments

Comments
 (0)