Re: [15/18] i2c: i2c-qup: use new 8 bit address helper function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/3/2016 12:44 PM, Wolfram Sang wrote:
Signed-off-by: Wolfram Sang <wsa@xxxxxxxxxxxxx>
---
  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 23eaabb19f961a..cc6439ab3f7141 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -515,7 +515,7 @@ static int qup_i2c_get_data_len(struct qup_i2c_dev *qup)
  static int qup_i2c_set_tags(u8 *tags, struct qup_i2c_dev *qup,
  			    struct i2c_msg *msg,  int is_dma)
  {
-	u16 addr = (msg->addr << 1) | ((msg->flags & I2C_M_RD) == I2C_M_RD);
+	u16 addr = i2c_8bit_addr_from_msg(msg);
  	int len = 0;
  	int data_len;
Looks good to me. Tested ok on QDF2432.
There is another place in issue_read that we can use this helper function. I will send a follow up patch.

Reviewed by: Naveen Kaje <nkaje@xxxxxxxxxxxxxx>
Tested by: Naveen Kaje <nkaje@xxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux