summaryrefslogtreecommitdiff
path: root/zephyr/emul/emul_syv682x.c
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-09-10 12:16:07 -0600
committerCommit Bot <commit-bot@chromium.org>2021-09-10 23:13:51 +0000
commitbaaa981c243702db15559abcf725dd448cee4bdb (patch)
tree82e4c2a4d3acf0faa139805bea2393d9c70239c2 /zephyr/emul/emul_syv682x.c
parent2c0c44bed1d4b866cd33abc6ed29ac6241b32476 (diff)
downloadchrome-ec-baaa981c243702db15559abcf725dd448cee4bdb.tar.gz
zephyr: emul: update EMUL_DEFINE call sites
Update the call sites of EMUL_DEFINE to include the data pointer. BRANCH=none BUG=none TEST=zmake testall Cq-Depend: chromium:3154404 Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Icb1a788a2ffcbdd969c231edb2214447041ed5ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3153590 Tested-by: Yuval Peress <peress@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Yuval Peress <peress@google.com>
Diffstat (limited to 'zephyr/emul/emul_syv682x.c')
-rw-r--r--zephyr/emul/emul_syv682x.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/zephyr/emul/emul_syv682x.c b/zephyr/emul/emul_syv682x.c
index b9c850bcd8..dff9df651c 100644
--- a/zephyr/emul/emul_syv682x.c
+++ b/zephyr/emul/emul_syv682x.c
@@ -153,16 +153,15 @@ static int syv682x_emul_init(const struct emul *emul,
return ret;
}
-#define SYV682X_EMUL(n) \
- static struct syv682x_emul_data syv682x_emul_data_##n = { \
- }; \
- \
- static const struct syv682x_emul_cfg syv682x_emul_cfg_##n = { \
- .i2c_label = DT_INST_BUS_LABEL(n), \
- .data = &syv682x_emul_data_##n, \
- .addr = DT_INST_REG_ADDR(n), \
- }; \
- EMUL_DEFINE(syv682x_emul_init, DT_DRV_INST(n), &syv682x_emul_cfg_##n)
+#define SYV682X_EMUL(n) \
+ static struct syv682x_emul_data syv682x_emul_data_##n = {}; \
+ static const struct syv682x_emul_cfg syv682x_emul_cfg_##n = { \
+ .i2c_label = DT_INST_BUS_LABEL(n), \
+ .data = &syv682x_emul_data_##n, \
+ .addr = DT_INST_REG_ADDR(n), \
+ }; \
+ EMUL_DEFINE(syv682x_emul_init, DT_DRV_INST(n), &syv682x_emul_cfg_##n, \
+ &syv682x_emul_data_##n)
DT_INST_FOREACH_STATUS_OKAY(SYV682X_EMUL)