diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2020-10-28 10:02:32 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-02 10:17:27 +0000 |
commit | 71069893536962157b3b25330851a1c2c7cd6da5 (patch) | |
tree | 22c6f60ff900b68871f81e44cfe01b7616561bb6 /common/motion_sense.c | |
parent | 0438542f2690e958d47dd28636797acbd29fcd9d (diff) | |
download | chrome-ec-71069893536962157b3b25330851a1c2c7cd6da5.tar.gz |
atomic: rename atomic_read_clear to atomic_clear
Rename atomic_read_clear to atomic_clear to be consistent with the rest
of the atomic functions, which return the previous value of the
variable.
BUG=b:169151160
BRANCH=none
TEST=buildall
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I2588971bd7687879a28ec637cf5f6c3d27d393f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2505143
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'common/motion_sense.c')
-rw-r--r-- | common/motion_sense.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c index 6feed6738d..2869f93984 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -677,7 +677,7 @@ static int motion_sense_process(struct motion_sensor_t *sensor, if (*event & TASK_EVENT_MOTION_ODR_CHANGE) { const int sensor_bit = 1 << sensor_num; - int odr_pending = atomic_read_clear(&odr_event_required); + int odr_pending = atomic_clear(&odr_event_required); is_odr_pending = odr_pending & sensor_bit; odr_pending &= ~sensor_bit; @@ -707,7 +707,7 @@ static int motion_sense_process(struct motion_sensor_t *sensor, } if (IS_ENABLED(CONFIG_ACCEL_FIFO) && *event & TASK_EVENT_MOTION_FLUSH_PENDING) { - int flush_pending = atomic_read_clear(&sensor->flush_pending); + int flush_pending = atomic_clear(&sensor->flush_pending); for (; flush_pending > 0; flush_pending--) { motion_sense_fifo_insert_async_event( |