Commit fdd15f65 authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron

iio:accel:bmc150-accel: make use of mask definition

BMC150_ACCEL_SLOPE_THRES_MASK was defined some time ago, but its 'magic'
value got used instead in bmc150_accel_write_event(). Make use of it for
improved readability.
Signed-off-by: default avatarHartmut Knaack <knaack.h@gmx.de>
Reviewed-by: default avatarOctavian Purdila <octavian.purdila@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 825c50db
...@@ -776,7 +776,7 @@ static int bmc150_accel_write_event(struct iio_dev *indio_dev, ...@@ -776,7 +776,7 @@ static int bmc150_accel_write_event(struct iio_dev *indio_dev,
switch (info) { switch (info) {
case IIO_EV_INFO_VALUE: case IIO_EV_INFO_VALUE:
data->slope_thres = val & 0xFF; data->slope_thres = val & BMC150_ACCEL_SLOPE_THRES_MASK;
break; break;
case IIO_EV_INFO_PERIOD: case IIO_EV_INFO_PERIOD:
data->slope_dur = val & BMC150_ACCEL_SLOPE_DUR_MASK; data->slope_dur = val & BMC150_ACCEL_SLOPE_DUR_MASK;
......
Markdown is supported
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