]> 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)
commit634eeca2664a4a888e2288673f78bb287e154abb
tree17fa90a1374d48dc32adf6eaf3aec7633886eac1
parent70d61180d1a8077db756560b4c21da4baa22e58c
[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