diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-11-25 11:49:04 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-07 08:50:14 +0000 |
commit | bb4c47af02a21be2cc9205adc8bae83862de780a (patch) | |
tree | 723db42d9b84715efba744c2920ad74a2c52439a /baseboard/asurada | |
parent | e3dc95984501e49a9718fb207a17a30ec7945ef4 (diff) | |
download | chrome-ec-bb4c47af02a21be2cc9205adc8bae83862de780a.tar.gz |
usb: use atomic_t where possible
There are many places where atomic_t can be used and passed to atomic_*
function without casting, so change that.
Since atomic is a signed type, do not modify the type timer_active,
timer_disabled and dpm_dp_flag, because mixing types in the shift
operations create differences in asm code.
It shouldn't change the generated code.
The change will be useful for incoming commits related to modifying
atomic_t caused by a change in Zephyr upstream (atomic_t from int to
long).
BUG=b:207082842
TEST=make buildall && zmake testall
BRANCH=main
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: Ia1e5447c8c47ca3deccbe5c250ac4d45ceb5b133
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3302208
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
Diffstat (limited to 'baseboard/asurada')
-rw-r--r-- | baseboard/asurada/usb_pd_policy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/baseboard/asurada/usb_pd_policy.c b/baseboard/asurada/usb_pd_policy.c index f9ba7e5a4d..6a7621f450 100644 --- a/baseboard/asurada/usb_pd_policy.c +++ b/baseboard/asurada/usb_pd_policy.c @@ -155,7 +155,7 @@ __override void svdm_exit_dp_mode(int port) int pd_snk_is_vbus_provided(int port) { - static int vbus_prev[CONFIG_USB_PD_PORT_MAX_COUNT]; + static atomic_t vbus_prev[CONFIG_USB_PD_PORT_MAX_COUNT]; int vbus; if ((IS_ENABLED(BOARD_HAYATO) && board_get_version() < 4) || |