staging:iio:ade7854: Rework I2C read function
authorRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Fri, 23 Mar 2018 14:26:57 +0000 (11:26 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 24 Mar 2018 13:26:45 +0000 (13:26 +0000)
commit5d55dcbc31de521060a492e82706b92a43bd7580
tree489aff63a544896f0de26223b28e9fe83c367e07
parent259a8202b6fd2831868ad2069ec3ef3b808a26ad
staging:iio:ade7854: Rework I2C read function

The read operation for the I2C function has many duplications that can
be generalized into a single function. This patch reworks the read
operation for I2C to centralizes all similar code in a single function.

It is possible to remove all the old interface to use the new one,
however, for keeping the things simple and working this patch maintain
legacy interface.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/meter/ade7854-i2c.c