summaryrefslogtreecommitdiff
path: root/common/usb_pd_protocol.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/usb_pd_protocol.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/usb_pd_protocol.c')
-rw-r--r--common/usb_pd_protocol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index cbf1a193cb..1fe963f1fc 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -531,8 +531,8 @@ static int reset_device_and_notify(int port)
* waking the TCPC, but it has also set PD_EVENT_TCPC_RESET again, which
* would result in a second, unnecessary init.
*/
- deprecated_atomic_clear(task_get_event_bitmap(task_get_current()),
- PD_EVENT_TCPC_RESET);
+ deprecated_atomic_clear_bits(task_get_event_bitmap(task_get_current()),
+ PD_EVENT_TCPC_RESET);
waiting_tasks =
deprecated_atomic_read_clear(&pd[port].tasks_waiting_on_reset);
@@ -611,8 +611,8 @@ void pd_prevent_low_power_mode(int port, int prevent)
deprecated_atomic_or(&pd[port].tasks_preventing_lpm,
current_task_mask);
else
- deprecated_atomic_clear(&pd[port].tasks_preventing_lpm,
- current_task_mask);
+ deprecated_atomic_clear_bits(&pd[port].tasks_preventing_lpm,
+ current_task_mask);
}
/* This is only called from the PD tasks that owns the port. */