summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-qup.c
diff options
context:
space:
mode:
authorNaveen Kaje <nkaje@codeaurora.org>2016-05-05 12:33:17 -0600
committerWolfram Sang <wsa@the-dreams.de>2016-06-18 18:26:58 +0200
commit0130944bc1d212ad4b33584424d56fe7c049eb65 (patch)
tree89fa01fdab4335e5eba4565ec13836a520526549 /drivers/i2c/busses/i2c-qup.c
parentfbf9921f8b35d9b241a1ee0008d310a3a5390273 (diff)
downloadtalos-obmc-linux-0130944bc1d212ad4b33584424d56fe7c049eb65.tar.gz
talos-obmc-linux-0130944bc1d212ad4b33584424d56fe7c049eb65.zip
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>
Diffstat (limited to 'drivers/i2c/busses/i2c-qup.c')
-rw-r--r--drivers/i2c/busses/i2c-qup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 3e5fac88376d..69849a95d479 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1012,7 +1012,7 @@ static void qup_i2c_issue_read(struct qup_i2c_dev *qup, struct i2c_msg *msg)
{
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) */
len = (msg->len == QUP_READ_LIMIT) ? 0 : msg->len;
OpenPOWER on IntegriCloud