Skip to content

Commit e75c49a

Browse files
GuEe-GUIRbb666
authored andcommitted
[DM/THERMAL] fixup coefficients's offset lost
coefficients is double u32 data list.
1 parent ba50b60 commit e75c49a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/drivers/thermal/thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static void thermal_ofw_params_parse(struct rt_ofw_node *np,
4848
* For now, the thermal framework supports only one sensor per thermal zone.
4949
* Thus, we are considering only the first two values as slope and offset.
5050
*/
51-
if (rt_ofw_prop_read_u32_array_index(np, "coefficients", 0, 1, coef) < 0)
51+
if (rt_ofw_prop_read_u32_array_index(np, "coefficients", 0, 2, coef) < 0)
5252
{
5353
coef[0] = 1;
5454
coef[1] = 0;

0 commit comments

Comments
 (0)