forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/media/common/saa7146/saa7146_i2c.c
....@@ -54,10 +54,7 @@
5454 /* loop through all messages */
5555 for(i = 0; i < num; i++) {
5656
57
- /* insert the address of the i2c-slave.
58
- note: we get 7 bit i2c-addresses,
59
- so we have to perform a translation */
60
- addr = (m[i].addr*2) + ( (0 != (m[i].flags & I2C_M_RD)) ? 1 : 0);
57
+ addr = i2c_8bit_addr_from_msg(&m[i]);
6158 h1 = op_count/3; h2 = op_count%3;
6259 op[h1] |= cpu_to_le32( (u8)addr << ((3-h2)*8));
6360 op[h1] |= cpu_to_le32(SAA7146_I2C_START << ((3-h2)*2));