OSDN Git Service

media: i2c: adv7511: remove open coded version of SMBus block read
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 27 Jan 2021 10:33:57 +0000 (11:33 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Mar 2021 10:59:45 +0000 (11:59 +0100)
commiteea62d6d471a08fe1a18c6c4ddccfde24a005beb
tree780631ee9e9b3e34fffac2eaf8519438a4d50109
parentcb1318fd80c37085e63a79a1fe96fd82399d9469
media: i2c: adv7511: remove open coded version of SMBus block read

The open coded version differs from the one in the core in one way: the
buffer will be always copied back, even when the transfer failed. Be
more robust: use the block read from the I2C core and propagate a
potential errno further to the sanity checks.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/adv7511-v4l2.c