diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2014-08-22 21:48:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-05 14:54:11 -0700 |
commit | cde9b0d1ec4f85fa3602a158c2e3ee5e6d6b925d (patch) | |
tree | b617e73661593aa466375d9ab67f4fb3d9bfda16 /drivers/iio | |
parent | 4fcf3add79df4540e4c18b389e8ee653bfe39cba (diff) | |
download | linux-3.10-cde9b0d1ec4f85fa3602a158c2e3ee5e6d6b925d.tar.gz linux-3.10-cde9b0d1ec4f85fa3602a158c2e3ee5e6d6b925d.tar.bz2 linux-3.10-cde9b0d1ec4f85fa3602a158c2e3ee5e6d6b925d.zip |
iio: inv_mpu6050: Fix indio_dev->trig assignment
commit b07e3b3850b2e1f09c19f54d3ed7210d9f529e2c upstream.
This can result in wrong reference count for trigger device, call
iio_trigger_get to increment reference.
Refer to http://www.spinics.net/lists/linux-iio/msg13669.html for discussion
with Jonathan.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c index 03b9372c121..926fccea8de 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c @@ -135,7 +135,7 @@ int inv_mpu6050_probe_trigger(struct iio_dev *indio_dev) ret = iio_trigger_register(st->trig); if (ret) goto error_free_irq; - indio_dev->trig = st->trig; + indio_dev->trig = iio_trigger_get(st->trig); return 0; |