i2c: ocores: 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>
This commit is contained in:
parent
0d47ce210a
commit
380a295c87
|
@ -178,10 +178,7 @@ static void ocores_process(struct ocores_i2c *i2c)
|
||||||
if (i2c->nmsgs) { /* end? */
|
if (i2c->nmsgs) { /* end? */
|
||||||
/* send start? */
|
/* send start? */
|
||||||
if (!(msg->flags & I2C_M_NOSTART)) {
|
if (!(msg->flags & I2C_M_NOSTART)) {
|
||||||
u8 addr = (msg->addr << 1);
|
u8 addr = i2c_8bit_addr_from_msg(msg);
|
||||||
|
|
||||||
if (msg->flags & I2C_M_RD)
|
|
||||||
addr |= 1;
|
|
||||||
|
|
||||||
i2c->state = STATE_START;
|
i2c->state = STATE_START;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue