]> git.baikalelectronics.ru Git - kernel.git/commit
[media] em28xx-i2c: relax error check in em28xx_i2c_recv_bytes()
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Sun, 10 Mar 2013 10:25:25 +0000 (07:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 18 Mar 2013 23:18:29 +0000 (20:18 -0300)
commit79f4d2ed27b9d870c9fa678c6b0caa8571c4d395
tree17fa90a1374d48dc32adf6eaf3aec7633886eac1
parent6ebe9f307b7385554833901acc04882518255b1f
[media] em28xx-i2c: relax error check in em28xx_i2c_recv_bytes()

It turned out that some devices return less bytes then requested via i2c when
ALL of the following 3 conditions are met:
- i2c bus B is used
- there was no attempt to write to the specified slave address before
- no device present at the specified slave address
With the current code, this triggers an -EIO error and prints a message to the
system log.
Because it can happen very often during device probing, it is better to ignore
this error and bail out silently after the follwing i2c transaction success
check with -ENODEV.

[mchehab@redhat.com: a small CodingStyle fix]
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/em28xx/em28xx-i2c.c