diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2016-04-03 21:44:55 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-04-11 19:54:59 +0300 |
commit | 0d47ce210a5d6733d7bc8cb07f158908bb224629 (patch) | |
tree | f5fc59c173977c47d7bfbce308433f11af082dae /drivers/i2c | |
parent | 043f47f49b3646beab84019eefb2c336be87db5f (diff) | |
download | linux-0d47ce210a5d6733d7bc8cb07f158908bb224629.tar.xz |
i2c: mt65xx: use new 8 bit address helper function
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-mt65xx.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c index 453358b4d9ca..d9373e60be8a 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -413,10 +413,7 @@ static int mtk_i2c_do_transfer(struct mtk_i2c *i2c, struct i2c_msg *msgs, else writew(I2C_FS_START_CON, i2c->base + OFFSET_EXT_CONF); - addr_reg = msgs->addr << 1; - if (i2c->op == I2C_MASTER_RD) - addr_reg |= 0x1; - + addr_reg = i2c_8bit_addr_from_msg(msgs); writew(addr_reg, i2c->base + OFFSET_SLAVE_ADDR); /* Clear interrupt status */ |