summaryrefslogtreecommitdiff
path: root/drivers/i2c/rcar_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/rcar_i2c.c')
-rw-r--r--drivers/i2c/rcar_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c
index 4267bbfa5a..663c342cd8 100644
--- a/drivers/i2c/rcar_i2c.c
+++ b/drivers/i2c/rcar_i2c.c
@@ -211,7 +211,7 @@ static int rcar_i2c_xfer(struct udevice *dev, struct i2c_msg *msg, int nmsgs)
int ret;
for (; nmsgs > 0; nmsgs--, msg++) {
- ret = rcar_i2c_set_addr(dev, msg->addr, 1);
+ ret = rcar_i2c_set_addr(dev, msg->addr, !!(msg->flags & I2C_M_RD));
if (ret)
return ret;