iio: imu: kmx61: Save odr_bits for later use

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Daniel Baluta 2014-12-23 15:22:24 +02:00 committed by Jonathan Cameron
parent 1f202725b7
commit 4e8439779e

View File

@ -465,6 +465,8 @@ static int kmx61_set_odr(struct kmx61_data *data, int val, int val2, u8 device)
if (ret < 0) if (ret < 0)
return ret; return ret;
data->odr_bits = odr_bits;
if (device & KMX61_ACC) { if (device & KMX61_ACC) {
ret = kmx61_set_wake_up_odr(data, val, val2); ret = kmx61_set_wake_up_odr(data, val, val2);
if (ret) if (ret)