Skip to content

Commit 001fceb

Browse files
Hartmut Knaackjic23
authored andcommitted
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: 1e79841 ("iio: mma8452: Add highpass filter configuration.") Signed-off-by: Hartmut Knaack <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 0ad4bf3 commit 001fceb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/accel/mma8452.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static int mma8452_get_hp_filter_index(struct mma8452_data *data,
229229
int i = mma8452_get_odr_index(data);
230230

231231
return mma8452_get_int_plus_micros_index(mma8452_hp_filter_cutoff[i],
232-
ARRAY_SIZE(mma8452_scales[0]), val, val2);
232+
ARRAY_SIZE(mma8452_hp_filter_cutoff[0]), val, val2);
233233
}
234234

235235
static int mma8452_read_hp_filter(struct mma8452_data *data, int *hz, int *uHz)

0 commit comments

Comments
 (0)