iio: imu: inv_mpu6050: fix lock issues by using our own mutex
authorJean-Baptiste Maneyrol <JManeyrol@invensense.com>
Wed, 7 Jun 2017 13:41:42 +0000 (13:41 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sun, 11 Jun 2017 14:07:37 +0000 (15:07 +0100)
commit68cd6e5b206b21ff5226c806c55fd8c718d5bde5
tree9cd91b390b10c26153bf429eb19b428b355e5ea6
parente8ee2b67bd0f334613794a7e27dfd8fd51998edf
iio: imu: inv_mpu6050: fix lock issues by using our own mutex

There are several locks issues when using buffer and direct polling
data at the same time. Use our own mutex for managing locking and
block simultaneous use of buffer and direct polling by using
iio_device_{claim/release}_direct_mode. This makes chip_config
enable bit obsolete, so delete it.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c