From: Wolfram Sang Date: Sun, 3 Apr 2016 18:44:53 +0000 (+0200) Subject: i2c: iop3xx: use new 8 bit address helper function X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=515e240bb54c53195fe0c7a9bad92ffb23e8bc54;p=linux-beck.git i2c: iop3xx: use new 8 bit address helper function Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index 72d6161cf77c..85cbe4b55578 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c @@ -50,10 +50,7 @@ iic_cook_addr(struct i2c_msg *msg) { unsigned char addr; - addr = (msg->addr << 1); - - if (msg->flags & I2C_M_RD) - addr |= 1; + addr = i2c_8bit_addr_from_msg(msg); return addr; }