iio: humidity: hts221: refactor write_with_mask code
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Mon, 17 Jul 2017 17:38:56 +0000 (19:38 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 22 Jul 2017 20:18:04 +0000 (21:18 +0100)
commitbd49302a73340cc3d064e5959524732ea0eea1ef
tree5ccabb4038e5d31b86e1b1e63983036aaa3147e6
parenta94c24a712acb26f3712ec7bf56e9b13e40a2a74
iio: humidity: hts221: refactor write_with_mask code

Move bit-shift in hts221_write_with_mask() instead of coding
the shift depth in the configured value. That change will be necessary
to fix an issue in device power-down procedure.
Simplify hts221_avg_list table management

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/humidity/hts221.h
drivers/iio/humidity/hts221_core.c