Use i2c_10bit_addr_from_msg() helper instead of local copy. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/i2c/busses/i2c-mt7621.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt7621.c b/drivers/i2c/busses/i2c-mt7621.c index 2103f21f9ddd..125dc91fb329 100644 --- a/drivers/i2c/busses/i2c-mt7621.c +++ b/drivers/i2c/busses/i2c-mt7621.c @@ -164,10 +164,8 @@ static int mtk_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, /* write address */ if (pmsg->flags & I2C_M_TEN) { /* 10 bits address */ - addr = 0xf0 | ((pmsg->addr >> 7) & 0x06); + addr = i2c_10bit_addr_from_msg(pmsg); addr |= (pmsg->addr & 0xff) << 8; - if (pmsg->flags & I2C_M_RD) - addr |= 1; iowrite32(addr, i2c->base + REG_SM0D0_REG); ret = mtk_i2c_cmd(i2c, SM0CTL1_WRITE, 2); if (ret) -- 2.45.1.3035.g276e886db78b