i2c: qup: use address helper function in read transfer

qup_i2c_issue_read() derives the address from i2c_msg.
This called in the read path when I2C_M_RD flag is set.
Therefore, use the 8 bit address helper function.

Signed-off-by: Naveen Kaje <nkaje@codeaurora.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Naveen Kaje 2016-05-05 12:33:17 -06:00 committed by Wolfram Sang
parent fbf9921f8b
commit 0130944bc1
1 changed files with 1 additions and 1 deletions

View File

@ -1012,7 +1012,7 @@ static void qup_i2c_issue_read(struct qup_i2c_dev *qup, struct i2c_msg *msg)
{ {
u32 addr, len, val; u32 addr, len, val;
addr = (msg->addr << 1) | 1; addr = i2c_8bit_addr_from_msg(msg);
/* 0 is used to specify a length 256 (QUP_READ_LIMIT) */ /* 0 is used to specify a length 256 (QUP_READ_LIMIT) */
len = (msg->len == QUP_READ_LIMIT) ? 0 : msg->len; len = (msg->len == QUP_READ_LIMIT) ? 0 : msg->len;