Skip to content
Commit 25afffe1 authored by Daniel Baluta's avatar Daniel Baluta Committed by Jonathan Cameron
Browse files

io: accel: kxcjk-1013: Fix iio_event_spec direction



Because IIO_EV_DIR_* are not bitmasks but enums,
IIO_EV_DIR_RISING | IIO_EV_DIR_FALLING is not equal
with IIO_EV_DIR_EITHER.

This could lead to potential misformatted sysfs attributes
like:
	* in_accel_x_thresh_(null)_en
	* in_accel_x_thresh_(null)_period
	* in_accel_x_thresh_(null)_value

or even memory corruption.

Fixes: b4b491c0 (iio: accel: kxcjk-1013: Support threshold)
Signed-off-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 03045bcf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment