iio: imu: kmx61: Fix device initialization when setting trigger state
authorDaniel Baluta <daniel.baluta@intel.com>
Tue, 23 Dec 2014 13:22:30 +0000 (15:22 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 5 Jan 2015 18:59:54 +0000 (18:59 +0000)
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>
drivers/iio/imu/kmx61.c

index a70a3ef..578e3dd 100644 (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;