diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-11-29 11:08:48 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-08 09:02:59 +0000 |
commit | 4f7cd7509d7a02b1d5f3f0fd3885202350b576f1 (patch) | |
tree | aadf304662b4436fcdbe352fcc27c009967faf7c /driver/ppc/nx20p348x.c | |
parent | de14a76701c668270f19c8d6af41aaa321f1c8c2 (diff) | |
download | chrome-ec-4f7cd7509d7a02b1d5f3f0fd3885202350b576f1.tar.gz |
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 <dn@semihalf.com>
Change-Id: I5c7fa6b74b84454b22074a2a00b5f10003ee9843
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306358
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
Diffstat (limited to 'driver/ppc/nx20p348x.c')
-rw-r--r-- | driver/ppc/nx20p348x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/ppc/nx20p348x.c b/driver/ppc/nx20p348x.c index b582259e04..130678d512 100644 --- a/driver/ppc/nx20p348x.c +++ b/driver/ppc/nx20p348x.c @@ -22,7 +22,7 @@ #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ## args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ## args) -static uint32_t irq_pending; /* Bitmask of ports signaling an interrupt. */ +static atomic_t irq_pending; /* Bitmask of ports signaling an interrupt. */ #define NX20P348X_DB_EXIT_FAIL_THRESHOLD 10 static int db_exit_fail_count[CONFIG_USB_PD_PORT_MAX_COUNT]; |