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-Tag: v5.15~13590^2~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=380a295c87a6423390898b98e388e1b0a399bb08;p=platform%2Fkernel%2Flinux-starfive.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 11b7b87..dfa7a4b 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;