summaryrefslogtreecommitdiff
path: root/driver/ppc/sn5s330.c
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2021-11-29 11:08:48 +0100
committerCommit Bot <commit-bot@chromium.org>2021-12-08 09:02:59 +0000
commit4f7cd7509d7a02b1d5f3f0fd3885202350b576f1 (patch)
treeaadf304662b4436fcdbe352fcc27c009967faf7c /driver/ppc/sn5s330.c
parentde14a76701c668270f19c8d6af41aaa321f1c8c2 (diff)
downloadchrome-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/sn5s330.c')
-rw-r--r--driver/ppc/sn5s330.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/ppc/sn5s330.c b/driver/ppc/sn5s330.c
index c45340250d..0e5934533e 100644
--- a/driver/ppc/sn5s330.c
+++ b/driver/ppc/sn5s330.c
@@ -26,7 +26,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. */
static int source_enabled[CONFIG_USB_PD_PORT_MAX_COUNT];
static int read_reg(uint8_t port, int reg, int *regval)