diff options
Diffstat (limited to 'zephyr/shim/src/thermal.c')
-rw-r--r-- | zephyr/shim/src/thermal.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/zephyr/shim/src/thermal.c b/zephyr/shim/src/thermal.c index c31e2bfcc6..abe6b7da9e 100644 --- a/zephyr/shim/src/thermal.c +++ b/zephyr/shim/src/thermal.c @@ -1,4 +1,4 @@ -/* Copyright 2021 The Chromium OS Authors. All rights reserved. +/* Copyright 2021 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -7,8 +7,8 @@ #include "temp_sensor/temp_sensor.h" #include "ec_commands.h" -#define THERMAL_CONFIG(node_id) \ - [ZSHIM_TEMP_SENSOR_ID(node_id)] = { \ +#define THERMAL_CONFIG(node_id) \ + [TEMP_SENSOR_ID(node_id)] = { \ .temp_host = { \ [EC_TEMP_THRESH_WARN] = \ C_TO_K(DT_PROP_OR(node_id, \ @@ -43,10 +43,10 @@ .temp_fan_max = C_TO_K(DT_PROP_OR(node_id, \ temp_fan_max, \ -273)), \ - }, + } struct ec_thermal_config thermal_params[] = { -#if DT_NODE_EXISTS(DT_PATH(named_temp_sensors)) - DT_FOREACH_CHILD(DT_PATH(named_temp_sensors), THERMAL_CONFIG) -#endif /* named_temp_sensors */ +#if DT_HAS_COMPAT_STATUS_OKAY(TEMP_SENSORS_COMPAT) + DT_FOREACH_CHILD_SEP(TEMP_SENSORS_NODEID, THERMAL_CONFIG, (, )) +#endif /* DT_HAS_COMPAT_STATUS_OKAY(TEMP_SENSORS_COMPAT) */ }; |