iio: imu: kmx61: Fix device initialization when setting trigger state
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
d4a4ae04d2
commit
dbdd0e2dd9
|
@ -1053,8 +1053,7 @@ static int kmx61_data_rdy_trigger_set_state(struct iio_trigger *trig,
|
|||
goto err_unlock;
|
||||
}
|
||||
|
||||
|
||||
if (data->acc_dready_trig == trig || data->motion_trig)
|
||||
if (data->acc_dready_trig == trig || data->motion_trig == trig)
|
||||
device = KMX61_ACC;
|
||||
else
|
||||
device = KMX61_MAG;
|
||||
|
|
Loading…
Reference in New Issue