Commit 8ae8cd6c authored by Frank Schaefer's avatar Frank Schaefer Committed by Mauro Carvalho Chehab

[media] em28xx-i2c: fix the i2c error description strings for -ENXIO

Commit d845fb3a "em28xx-i2c: add timeout debug information if i2c_debug enabled"
has added wrong error descriptions for -ENXIO.
The strings are also missing terminating newline characters, which breaks the
output format.
Signed-off-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent d86bc65a
...@@ -81,7 +81,7 @@ static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) ...@@ -81,7 +81,7 @@ static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len)
return len; return len;
if (ret == 0x94 + len - 1) { if (ret == 0x94 + len - 1) {
if (i2c_debug == 1) if (i2c_debug == 1)
em28xx_warn("R05 returned 0x%02x: I2C timeout", em28xx_warn("R05 returned 0x%02x: I2C ACK error\n",
ret); ret);
return -ENXIO; return -ENXIO;
} }
...@@ -128,7 +128,7 @@ static int em2800_i2c_recv_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) ...@@ -128,7 +128,7 @@ static int em2800_i2c_recv_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len)
break; break;
if (ret == 0x94 + len - 1) { if (ret == 0x94 + len - 1) {
if (i2c_debug == 1) if (i2c_debug == 1)
em28xx_warn("R05 returned 0x%02x: I2C timeout", em28xx_warn("R05 returned 0x%02x: I2C ACK error\n",
ret); ret);
return -ENXIO; return -ENXIO;
} }
...@@ -210,7 +210,7 @@ static int em28xx_i2c_send_bytes(struct em28xx *dev, u16 addr, u8 *buf, ...@@ -210,7 +210,7 @@ static int em28xx_i2c_send_bytes(struct em28xx *dev, u16 addr, u8 *buf,
return len; return len;
if (ret == 0x10) { if (ret == 0x10) {
if (i2c_debug == 1) if (i2c_debug == 1)
em28xx_warn("I2C transfer timeout on writing to addr 0x%02x", em28xx_warn("I2C ACK error on writing to addr 0x%02x\n",
addr); addr);
return -ENXIO; return -ENXIO;
} }
...@@ -274,7 +274,7 @@ static int em28xx_i2c_recv_bytes(struct em28xx *dev, u16 addr, u8 *buf, u16 len) ...@@ -274,7 +274,7 @@ static int em28xx_i2c_recv_bytes(struct em28xx *dev, u16 addr, u8 *buf, u16 len)
} }
if (ret == 0x10) { if (ret == 0x10) {
if (i2c_debug == 1) if (i2c_debug == 1)
em28xx_warn("I2C transfer timeout on writing to addr 0x%02x", em28xx_warn("I2C ACK error on writing to addr 0x%02x\n",
addr); addr);
return -ENXIO; return -ENXIO;
} }
...@@ -337,7 +337,7 @@ static int em25xx_bus_B_send_bytes(struct em28xx *dev, u16 addr, u8 *buf, ...@@ -337,7 +337,7 @@ static int em25xx_bus_B_send_bytes(struct em28xx *dev, u16 addr, u8 *buf,
return len; return len;
else if (ret > 0) { else if (ret > 0) {
if (i2c_debug == 1) if (i2c_debug == 1)
em28xx_warn("Bus B R08 returned 0x%02x: I2C timeout", em28xx_warn("Bus B R08 returned 0x%02x: I2C ACK error\n",
ret); ret);
return -ENXIO; return -ENXIO;
} }
...@@ -392,7 +392,7 @@ static int em25xx_bus_B_recv_bytes(struct em28xx *dev, u16 addr, u8 *buf, ...@@ -392,7 +392,7 @@ static int em25xx_bus_B_recv_bytes(struct em28xx *dev, u16 addr, u8 *buf,
return len; return len;
else if (ret > 0) { else if (ret > 0) {
if (i2c_debug == 1) if (i2c_debug == 1)
em28xx_warn("Bus B R08 returned 0x%02x: I2C timeout", em28xx_warn("Bus B R08 returned 0x%02x: I2C ACK error\n",
ret); ret);
return -ENXIO; return -ENXIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment