lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drivers: thermal: tsens: Work with old DTBs
From
Date
On 11/12/2019 10:58, Amit Kucheria wrote:
> In order for the old DTBs to continue working, the new interrupt code
> must not return an error if interrupts are not defined.
>
> Fixes: 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support")
> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> ---
> drivers/thermal/qcom/tsens.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 015e7d2015985..d8f51067ed411 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -109,7 +109,7 @@ static int tsens_register(struct tsens_priv *priv)
>
> irq = platform_get_irq_byname(pdev, "uplow");
> if (irq < 0) {
> - ret = irq;

'ret' remains uninitialized here.

> + dev_warn(&pdev->dev, "Missing uplow irq in DT\n");
> goto err_put_device;
> }
>
> @@ -118,7 +118,8 @@ static int tsens_register(struct tsens_priv *priv)
> IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
> dev_name(&pdev->dev), priv);
> if (ret) {
> - dev_err(&pdev->dev, "%s: failed to get irq\n", __func__);
> + dev_warn(&pdev->dev, "%s: failed to get uplow irq\n", __func__);
> + ret = 0;
> goto err_put_device;
> }

The code now is unable to make a distinction between an error in the DT
and the old DT :/

Why not version the DT?


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

\
 
 \ /
  Last update: 2019-12-11 17:13    [W:0.048 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site