diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2015-07-17 10:52:30 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-08-02 18:03:30 +0100 |
commit | 3021678a94cdb942bea4e634a37e91fe341b27b0 (patch) | |
tree | f672579850b75fd9deeb4efba1f35ff47b7ee1a4 /drivers/iio | |
parent | f9ba1ab4d19a79b4bef4baf21f559f9dd8ba33f9 (diff) | |
download | linux-3021678a94cdb942bea4e634a37e91fe341b27b0.tar.bz2 |
iio:magnetometer:bmc150_magn: expand mutex in trigger_handler
Keep the mutex locked, until the content of data->buffer has been pushed
out.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/magnetometer/bmc150_magn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c index 074a99da7367..324412d51cf8 100644 --- a/drivers/iio/magnetometer/bmc150_magn.c +++ b/drivers/iio/magnetometer/bmc150_magn.c @@ -664,7 +664,6 @@ static irqreturn_t bmc150_magn_trigger_handler(int irq, void *p) mutex_lock(&data->mutex); ret = bmc150_magn_read_xyz(data, data->buffer); - mutex_unlock(&data->mutex); if (ret < 0) goto err; @@ -672,6 +671,7 @@ static irqreturn_t bmc150_magn_trigger_handler(int irq, void *p) pf->timestamp); err: + mutex_unlock(&data->mutex); iio_trigger_notify_done(indio_dev->trig); return IRQ_HANDLED; |