]> git.karo-electronics.de Git - linux-beck.git/commitdiff
i2c: cpm: use new 8 bit address helper function
authorWolfram Sang <wsa@the-dreams.de>
Sun, 3 Apr 2016 18:44:50 +0000 (20:44 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 11 Apr 2016 16:54:59 +0000 (18:54 +0200)
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-cpm.c

index 714bdc837769fdc74fdf9208c18d0568ecc653ae..b6d2821aaabd5edaeba5b9027b130882720ca039 100644 (file)
@@ -197,9 +197,7 @@ static void cpm_i2c_parse_message(struct i2c_adapter *adap,
        tbdf = cpm->tbase + tx;
        rbdf = cpm->rbase + rx;
 
-       addr = pmsg->addr << 1;
-       if (pmsg->flags & I2C_M_RD)
-               addr |= 1;
+       addr = i2c_8bit_addr_from_msg(pmsg);
 
        tb = cpm->txbuf[tx];
        rb = cpm->rxbuf[rx];