From dbdd0e2dd9981eafe33687d0b2d089c5285ea22b Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Tue, 23 Dec 2014 15:22:30 +0200 Subject: iio: imu: kmx61: Fix device initialization when setting trigger state Signed-off-by: Daniel Baluta Acked-by: Hartmut Knaack Signed-off-by: Jonathan Cameron --- drivers/iio/imu/kmx61.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c index a70a3ef91793..578e3dd944c9 100644 --- a/drivers/iio/imu/kmx61.c +++ b/drivers/iio/imu/kmx61.c @@ -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; -- cgit v1.2.3