diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2016-04-03 21:44:46 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-04-11 19:54:59 +0300 |
commit | 041edda8757b5567b4d417e0cc9ade504dd4292f (patch) | |
tree | e17306971938f99d960e0b511055dd44e0f7228a /drivers/i2c/i2c-core.c | |
parent | a16d6ebca6efb73f6402f36e5aebf84f61721856 (diff) | |
download | linux-041edda8757b5567b4d417e0cc9ade504dd4292f.tar.xz |
i2c: core: 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>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index e584d88ee337..cc3c143b1c6a 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -2646,7 +2646,7 @@ static u8 i2c_smbus_pec(u8 crc, u8 *p, size_t count) static u8 i2c_smbus_msg_pec(u8 pec, struct i2c_msg *msg) { /* The address will be sent first */ - u8 addr = (msg->addr << 1) | !!(msg->flags & I2C_M_RD); + u8 addr = i2c_8bit_addr_from_msg(msg); pec = i2c_smbus_pec(pec, &addr, 1); /* The data buffer follows */ |