Commit 6f6e65bf authored by Bogdan Davidoaia's avatar Bogdan Davidoaia Committed by Anas Nashif
Browse files

i2c: fix i2c_reg_update_byte



The device address must be given before the register address in the
parameter list of the i2c_reg_read_byte function.

Change-Id: I92afbbf83f76eeb58ec41a2a8c83dd909b78a23a
Signed-off-by: default avatarBogdan Davidoaia <bogdan.m.davidoaia@intel.com>
parent cc53ac79
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -370,7 +370,7 @@ static inline int i2c_reg_update_byte(struct device *dev, uint8_t dev_addr,
	uint8_t old_value, new_value;
	int rc;

	rc = i2c_reg_read_byte(dev, reg_addr, dev_addr, &old_value);
	rc = i2c_reg_read_byte(dev, dev_addr, reg_addr, &old_value);
	if (rc != 0) {
		return rc;
	}