[PATCH 16/21] i2c: pasemi: make use of i2c_8bit_addr_from_msg

From: Peter Rosin
Date: Mon May 14 2018 - 10:56:43 EST


Because it looks neater.

Signed-off-by: Peter Rosin <peda@xxxxxxxxxx>
---
drivers/i2c/busses/i2c-pasemi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c
index df1dbc92a024..55fd5c6f3cca 100644
--- a/drivers/i2c/busses/i2c-pasemi.c
+++ b/drivers/i2c/busses/i2c-pasemi.c
@@ -121,7 +121,7 @@ static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter,

read = msg->flags & I2C_M_RD ? 1 : 0;

- TXFIFO_WR(smbus, MTXFIFO_START | (msg->addr << 1) | read);
+ TXFIFO_WR(smbus, MTXFIFO_START | i2c_8bit_addr_from_msg(msg));

if (read) {
TXFIFO_WR(smbus, msg->len | MTXFIFO_READ |
--
2.11.0