* [PATCH] i2c: qup: use address helper function in read transfer
@ 2016-05-05 18:33 Naveen Kaje
2016-06-18 16:31 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Naveen Kaje @ 2016-05-05 18:33 UTC (permalink / raw)
To: wsa, linux-i2c, linux-kernel; +Cc: Naveen Kaje
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>
---
drivers/i2c/busses/i2c-qup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 8082919..072e352 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1038,7 +1038,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;
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: i2c: qup: use address helper function in read transfer
2016-05-05 18:33 [PATCH] i2c: qup: use address helper function in read transfer Naveen Kaje
@ 2016-06-18 16:31 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2016-06-18 16:31 UTC (permalink / raw)
To: Naveen Kaje; +Cc: linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
On Thu, May 05, 2016 at 12:33:17PM -0600, Naveen Kaje wrote:
> 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>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-18 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 18:33 [PATCH] i2c: qup: use address helper function in read transfer Naveen Kaje
2016-06-18 16:31 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).