i2c: ocores: use new 8 bit address helper function
[deliverable/linux.git] / drivers / i2c / busses / i2c-ocores.c
index 11b7b87311ed2ffb602dad86a31649bec0428dd8..dfa7a4b4a91d78ec827c074089e035f973c585eb 100644 (file)
@@ -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;
 
This page took 0.038966 seconds and 5 git commands to generate.