summaryrefslogtreecommitdiff
path: root/common/usb_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/usb_i2c.c')
-rw-r--r--common/usb_i2c.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/usb_i2c.c b/common/usb_i2c.c
index bf162b0e2b..e18673c799 100644
--- a/common/usb_i2c.c
+++ b/common/usb_i2c.c
@@ -107,7 +107,7 @@ static void usb_i2c_execute(struct usb_i2c_config const *config)
/* Payload is ready to execute. */
uint32_t count = usb_i2c_read_packet(config);
int portindex = (config->buffer[0] >> 0) & 0xf;
- uint16_t addr__7bf = (config->buffer[0] >> 8) & 0x7f;
+ uint16_t addr_flags = (config->buffer[0] >> 8) & 0x7f;
int write_count = ((config->buffer[0] << 4) & 0xf00) |
((config->buffer[1] >> 0) & 0xff);
int read_count = (config->buffer[1] >> 8) & 0xff;
@@ -134,7 +134,7 @@ static void usb_i2c_execute(struct usb_i2c_config const *config)
config->buffer[0] = USB_I2C_READ_COUNT_INVALID;
} else if (portindex >= i2c_ports_used) {
config->buffer[0] = USB_I2C_PORT_INVALID;
- } else if (addr__7bf == USB_I2C_CMD_ADDR__7bf) {
+ } else if (addr_flags == USB_I2C_CMD_ADDR_FLAGS) {
/*
* This is a non-i2c command, invoke the handler if it has
* been registered, if not - report the appropriate error.
@@ -155,11 +155,11 @@ static void usb_i2c_execute(struct usb_i2c_config const *config)
* knows about. It should behave closer to
* EC_CMD_I2C_PASSTHRU, which can protect ports and ranges.
*/
- ret = i2c_xfer__7bf(i2c_ports[portindex].port, addr__7bf,
- (uint8_t *)(config->buffer + 2) + offset,
- write_count,
- (uint8_t *)(config->buffer + 2),
- read_count);
+ ret = i2c_xfer(i2c_ports[portindex].port, addr_flags,
+ (uint8_t *)(config->buffer + 2) + offset,
+ write_count,
+ (uint8_t *)(config->buffer + 2),
+ read_count);
config->buffer[0] = usb_i2c_map_error(ret);
}
usb_i2c_write_packet(config, read_count + 4);