diff options
author | Yuval Peress <peress@chromium.org> | 2020-10-30 13:16:22 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-02 19:15:23 +0000 |
commit | 13323e77ff91a85154cfa5f504ed4609fb8cbfc7 (patch) | |
tree | 81709bca853db34a2eeb18a691514d0ba1ece1f8 /common | |
parent | f0e84c2df23995c61f7690a47f30f259bcde940e (diff) | |
download | chrome-ec-13323e77ff91a85154cfa5f504ed4609fb8cbfc7.tar.gz |
Replace I2C_GET_ADDR with I2C_STRIP_FLAGS
The new I2C_STRIP_FLAGS macro was added to avoid conflict with
Zephyr's macro. This CL performs the migration to that new API.
BRANCH=none
BUG=b:172067439
TEST=make runtests -j and built for various boards: eve, volteer,
arcada_ish, atlas, hatch, kohaku, nocturne, samus, and scarlet
Change-Id: I0583b647435db96ec268f186252b367bdc4118a6
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511097
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/i2c_trace.c | 2 | ||||
-rw-r--r-- | common/motion_sense.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/common/i2c_trace.c b/common/i2c_trace.c index 340de901f9..d5d5e5d8f2 100644 --- a/common/i2c_trace.c +++ b/common/i2c_trace.c @@ -28,7 +28,7 @@ void i2c_trace_notify(int port, uint16_t slave_addr_flags, const uint8_t *in_data, size_t in_size) { size_t i; - uint16_t addr = I2C_GET_ADDR(slave_addr_flags); + uint16_t addr = I2C_STRIP_FLAGS(slave_addr_flags); for (i = 0; i < ARRAY_SIZE(trace_entries); i++) if (trace_entries[i].enabled diff --git a/common/motion_sense.c b/common/motion_sense.c index 2869f93984..a32a2154d7 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -1742,7 +1742,7 @@ static int command_display_accel_info(int argc, char **argv) ccprintf("type: %d\n", motion_sensors[i].type); ccprintf("location: %d\n", motion_sensors[i].location); ccprintf("port: %d\n", motion_sensors[i].port); - ccprintf("addr: %d\n", I2C_GET_ADDR(motion_sensors[i] + ccprintf("addr: %d\n", I2C_STRIP_FLAGS(motion_sensors[i] .i2c_spi_addr_flags)); ccprintf("range: %d\n", motion_sensors[i].default_range); ccprintf("min_freq: %d\n", motion_sensors[i].min_frequency); |