summaryrefslogtreecommitdiff
path: root/common/dptf.c
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2020-09-24 09:20:41 +0200
committerCommit Bot <commit-bot@chromium.org>2020-10-06 09:44:48 +0000
commit32b7e8875e0a08290168ec7dda040d5a5db513fa (patch)
treec1336b4c3c0a5e037618bef1ae944485e3f7840b /common/dptf.c
parentb536c348359487f0408a17af8d9d506f5a1d18a6 (diff)
downloadchrome-ec-32b7e8875e0a08290168ec7dda040d5a5db513fa.tar.gz
core: rename atomic_clear to atomic_clear_bits
Change the name of atomic_clear to atomic_clear_bits to make to name more clear - the function clears only selected bits, but the name may suggest that it clears the whole variable. It is done as a part of porting to Zephyr, where atomic_clear zeros the variable. BUG=b:169151160 BRANCH=none TEST=buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I7b0b47959c6c54af40f61bca8d9baebaa0375970 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428943 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'common/dptf.c')
-rw-r--r--common/dptf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/dptf.c b/common/dptf.c
index 75bcdcad01..f4fc6d0ff6 100644
--- a/common/dptf.c
+++ b/common/dptf.c
@@ -47,7 +47,7 @@ int dptf_query_next_sensor_event(void)
for (id = 0; id < TEMP_SENSOR_COUNT; id++)
if (dptf_seen & BIT(id)) { /* atomic? */
- deprecated_atomic_clear(&dptf_seen, BIT(id));
+ deprecated_atomic_clear_bits(&dptf_seen, BIT(id));
return id;
}
@@ -109,7 +109,7 @@ void dptf_set_temp_threshold(int sensor_id, int temp, int idx, int enable)
if (dptf_threshold[sensor_id][idx].temp == -1)
cond_init(&dptf_threshold[sensor_id][idx].over, 0);
dptf_threshold[sensor_id][idx].temp = temp;
- deprecated_atomic_clear(&dptf_seen, BIT(sensor_id));
+ deprecated_atomic_clear_bits(&dptf_seen, BIT(sensor_id));
} else {
dptf_threshold[sensor_id][idx].temp = -1;
}