From a05f7b9f469e7c171f4a737968ab5cbd11ba1253 Mon Sep 17 00:00:00 2001 From: Dawid Niedzwiecki Date: Wed, 7 Oct 2020 12:13:52 +0200 Subject: tree: Use new atomic_* implementation It is done as a part of porting to Zephyr. Since the implementation of atomic functions is done for all architectures use atomic_* instead of deprecated_atomic_*. Sometimes there was a compilation error "discards 'volatile' qualifier" due to dropping "volatile" in the argument of the functions, thus some pointers casts need to be made. It shouldn't cause any issues, because we are sure about generated asm (store operation will be performed). BUG=b:169151160 BRANCH=none TEST=buildall Signed-off-by: Dawid Niedzwiecki Change-Id: I98f590c323c3af52035e62825e8acfa358e0805a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2478949 Tested-by: Jett Rink Reviewed-by: Jett Rink Reviewed-by: Tom Hughes --- chip/stm32/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chip/stm32/usb.c') diff --git a/chip/stm32/usb.c b/chip/stm32/usb.c index 1711480d53..f6e1daa8a5 100644 --- a/chip/stm32/usb.c +++ b/chip/stm32/usb.c @@ -517,7 +517,7 @@ void usb_wake(void) } /* Only allow one caller at a time. */ - if (!deprecated_atomic_read_clear(&usb_wake_done)) + if (!atomic_read_clear((int *)&usb_wake_done)) return; CPRINTF("WAKE\n"); -- cgit v1.2.1