]> asedeno.scripts.mit.edu Git - linux.git/commit
media: dvb-frontends/stv0910: cleanup I2C access functions
authorDaniel Scheller <d.scheller@gmx.net>
Tue, 26 Dec 2017 23:37:57 +0000 (18:37 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 3 Jan 2018 09:46:59 +0000 (04:46 -0500)
commit8042e98c387b02fc4239eee0075d0f318efcf1d7
treec3bc68e4a465cba0f6f9a6b5689cf1ef4c451a9a
parent4b596bd70a396dfeb55f38b6bd1c21b8e77ebe77
media: dvb-frontends/stv0910: cleanup I2C access functions

write_reg() and i2c_write_reg16() only act as a proxy to i2c_write(), which
isn't called from anywhere else throughout the driver. Clean this up by
moving the message setup and the i2c_transfer() into write_reg() so it
becomes the only I2C write function. While touching those parts, fix the
error codes from EREMOTEIO to EIO.

The I2C cleanup is picked from the upstream dddvb.

Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/stv0910.c