From: Wolfram Sang Date: Sun, 3 Apr 2016 18:44:50 +0000 (+0200) Subject: i2c: cpm: use new 8 bit address helper function X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=949d0c5b72b94fb58a1d2c48c223658af24f58ee;p=linux-beck.git i2c: cpm: use new 8 bit address helper function Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index 714bdc837769..b6d2821aaabd 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c @@ -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];