summaryrefslogtreecommitdiffstats
path: root/drivers/iio/imu
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@intel.com>2014-12-23 15:22:30 +0200
committerJonathan Cameron <jic23@kernel.org>2015-01-05 18:59:54 +0000
commitdbdd0e2dd9981eafe33687d0b2d089c5285ea22b (patch)
treebead2a4d68de6b6506664d46ded9cc789edfea99 /drivers/iio/imu
parentd4a4ae04d236a01a8648648a0e11777250ab2974 (diff)
downloadlinux-dbdd0e2dd9981eafe33687d0b2d089c5285ea22b.tar.bz2
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>
Diffstat (limited to 'drivers/iio/imu')
-rw-r--r--drivers/iio/imu/kmx61.c3
1 files changed, 1 insertions, 2 deletions
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;