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:
Daniel Baluta 2014-12-23 15:22:30 +02:00 committed by Jonathan Cameron
parent d4a4ae04d2
commit dbdd0e2dd9
1 changed files with 1 additions and 2 deletions

View File

@ -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;