From: Daniel Baluta Date: Tue, 23 Dec 2014 13:22:30 +0000 (+0200) Subject: iio: imu: kmx61: Fix device initialization when setting trigger state X-Git-Tag: firefly_0821_release~176^2~2320^2~245^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dbdd0e2dd9981eafe33687d0b2d089c5285ea22b;p=firefly-linux-kernel-4.4.55.git iio: imu: kmx61: Fix device initialization when setting trigger state Signed-off-by: Daniel Baluta Acked-by: Hartmut Knaack Signed-off-by: Jonathan Cameron --- 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;