From cdaf5da81fad1d3ecdc8f45e80eff09b436020f0 Mon Sep 17 00:00:00 2001 From: GUI <39894654+GuEe-GUI@users.noreply.github.com> Date: Wed, 5 Mar 2025 17:29:24 +0800 Subject: [PATCH] [DM/THERMAL] fixup coefficients's offset lost coefficients is double u32 data list. --- components/drivers/thermal/thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/drivers/thermal/thermal.c b/components/drivers/thermal/thermal.c index 9343fe137a0..7832153f6fd 100644 --- a/components/drivers/thermal/thermal.c +++ b/components/drivers/thermal/thermal.c @@ -48,7 +48,7 @@ static void thermal_ofw_params_parse(struct rt_ofw_node *np, * For now, the thermal framework supports only one sensor per thermal zone. * Thus, we are considering only the first two values as slope and offset. */ - if (rt_ofw_prop_read_u32_array_index(np, "coefficients", 0, 1, coef) < 0) + if (rt_ofw_prop_read_u32_array_index(np, "coefficients", 0, 2, coef) < 0) { coef[0] = 1; coef[1] = 0;