提交 041edda8 编写于 作者: W Wolfram Sang

i2c: core: use new 8 bit address helper function

Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 a16d6ebc
...@@ -2646,7 +2646,7 @@ static u8 i2c_smbus_pec(u8 crc, u8 *p, size_t count) ...@@ -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) static u8 i2c_smbus_msg_pec(u8 pec, struct i2c_msg *msg)
{ {
/* The address will be sent first */ /* 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); pec = i2c_smbus_pec(pec, &addr, 1);
/* The data buffer follows */ /* The data buffer follows */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册