aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-08-02 22:43:46 +0200
committerJonathan Cameron <jic23@kernel.org>2015-08-08 17:27:26 +0100
commit001fceb9c64a39aebb85d31134182d39c1628a21 (patch)
tree5bfaf36c7e369692da8d52ddac81b9e5ec7297a0 /drivers/iio
parentiio:accel:bmc150-accel: Use the chip ID to detect sensor variant (diff)
downloadlinux-dev-001fceb9c64a39aebb85d31134182d39c1628a21.tar.xz
linux-dev-001fceb9c64a39aebb85d31134182d39c1628a21.zip
iio:accel:mma8452: fix _get_hp_filter_index
To iterate through the available frequencies of mma8452_hp_filter_cutoff[], the array size of a row of that table needs to be provided to _get_int_plus_micros_index(). Fixes: 1e79841a00e46 ("iio: mma8452: Add highpass filter configuration.") Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/accel/mma8452.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 3c4ad1563ca4..d78d4a97d753 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -229,7 +229,7 @@ static int mma8452_get_hp_filter_index(struct mma8452_data *data,
int i = mma8452_get_odr_index(data);
return mma8452_get_int_plus_micros_index(mma8452_hp_filter_cutoff[i],
- ARRAY_SIZE(mma8452_scales[0]), val, val2);
+ ARRAY_SIZE(mma8452_hp_filter_cutoff[0]), val, val2);
}
static int mma8452_read_hp_filter(struct mma8452_data *data, int *hz, int *uHz)