From 4f7cd7509d7a02b1d5f3f0fd3885202350b576f1 Mon Sep 17 00:00:00 2001 From: Dawid Niedzwiecki Date: Mon, 29 Nov 2021 11:08:48 +0100 Subject: atomic: use atomic_t where it is possible There are several places where atomic_t can be a type variables that are use with atomic_* operation, so use it. It sometimes has an impact on the asm code, but it is not significant. 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 Change-Id: I5c7fa6b74b84454b22074a2a00b5f10003ee9843 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306358 Reviewed-by: Jack Rosenthal Reviewed-by: Keith Short Reviewed-by: Tom Hughes Commit-Queue: Dawid Niedzwiecki --- chip/stm32/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chip/stm32/pwm.c') diff --git a/chip/stm32/pwm.c b/chip/stm32/pwm.c index 0b339399c9..aadbde08c2 100644 --- a/chip/stm32/pwm.c +++ b/chip/stm32/pwm.c @@ -17,7 +17,7 @@ #include "util.h" /* Bitmap of currently active PWM channels. 1 bit per channel. */ -static uint32_t using_pwm; +static atomic_t using_pwm; void pwm_set_duty(enum pwm_channel ch, int percent) { -- cgit v1.2.1