summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsravanM <Sravan@mindtribe.com>2016-02-05 14:28:25 -0800
committerEvan Wilson <evan@oliodevices.com>2016-02-19 01:06:58 -0800
commitccffdb0505e82210ff26c0e10611f8f7413e6be8 (patch)
tree1ec504970ec4e7f811e48acefb1a10718e649ed1
parent846821b6191c3d481ddee683201efdfa096785b0 (diff)
downloadolio-linux-3.10-ccffdb0505e82210ff26c0e10611f8f7413e6be8.tar.xz
olio-linux-3.10-ccffdb0505e82210ff26c0e10611f8f7413e6be8.zip
fixing multiplication
Change-Id: Ifb6ffdc63a3d26db7c87c90c30645791a58e2f32 Signed-off-by: Evan Wilson <evan@oliodevices.com>
-rw-r--r--drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c b/drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c
index df19c4e08d3..00948755125 100644
--- a/drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c
+++ b/drivers/iio/imu/st_lsm6ds3/st_lsm6ds3_core.c
@@ -802,8 +802,8 @@ int st_lsm6ds3_set_fifo_decimators_and_threshold(struct lsm6ds3_data *cdata)
if (fifo_len > 0) {
fifo_threshold = fifo_len / 2;
- if(fifo_threshold > cdata->min_latency_samples)
- fifo_threshold = cdata->min_latency_samples;
+ if(fifo_threshold > cdata->min_latency_samples * ST_LSM6DS3_FIFO_ELEMENT_LEN_BYTE)
+ fifo_threshold = cdata->min_latency_samples * ST_LSM6DS3_FIFO_ELEMENT_LEN_BYTE;
dev_info(cdata->dev,"setting FIFO length/threshold: 0x%x 0x%x ", fifo_len, fifo_threshold);