staging:iio:ade7854: Rework I2C write function
authorRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Fri, 23 Mar 2018 14:26:06 +0000 (11:26 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 24 Mar 2018 13:24:21 +0000 (13:24 +0000)
commite4c771d3a53c3401f0f29ad8b26e5b8cd43c25e7
tree6ed18e087472ac08077e6e4253b9cbf32910d1f2
parent6cef2ab01636b6021044f349df466a97c408ec27
staging:iio:ade7854: Rework I2C write function

The write operation using I2C has many code duplications and four
different interfaces per data size. This patch introduces a single
function that centralizes the main tasks.

The central function inserted by this patch can easily replace all the
four functions related to the data size. However, this patch does not
remove any code signature for keeping the meter module work and make
easier to review this patch.

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