From: Wolfram Sang Date: Sun, 3 Apr 2016 18:44:56 +0000 (+0200) Subject: i2c: ocores: use new 8 bit address helper function X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=380a295c87a6423390898b98e388e1b0a399bb08;p=linux-beck.git i2c: ocores: use new 8 bit address helper function Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index 11b7b87311ed..dfa7a4b4a91d 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b/drivers/i2c/busses/i2c-ocores.c @@ -178,10 +178,7 @@ static void ocores_process(struct ocores_i2c *i2c) if (i2c->nmsgs) { /* end? */ /* send start? */ if (!(msg->flags & I2C_M_NOSTART)) { - u8 addr = (msg->addr << 1); - - if (msg->flags & I2C_M_RD) - addr |= 1; + u8 addr = i2c_8bit_addr_from_msg(msg); i2c->state = STATE_START;