iio: imu: st_lsm6dsx: set sensor->odr value just in st_lsm6dsx_write_raw()
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Mon, 18 Sep 2017 17:49:57 +0000 (19:49 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 24 Sep 2017 15:24:35 +0000 (16:24 +0100)
commit5e3c3e3382e87a637c5c9229b4b539dfbf81c64b
tree8f8fd70360bf1e7a5dcec91ceddd123a4b1e97fe
parentba272e3bbeaee3b34ca6c616f7ad8d3c65f33f79
iio: imu: st_lsm6dsx: set sensor->odr value just in st_lsm6dsx_write_raw()

Update odr value in st_lsm6dsx_sensor data structure just in
st_lsm6dsx_write_raw() in order to avoid to set the same value
multiple times

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c