iio: imu: kmx61: Save odr_bits for later use
authorDaniel Baluta <daniel.baluta@intel.com>
Tue, 23 Dec 2014 13:22:24 +0000 (15:22 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 5 Jan 2015 18:59:50 +0000 (18:59 +0000)
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>
drivers/iio/imu/kmx61.c

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