mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
iio: buffer-dma: Use lockdep for locking annotations
Don't use mutex_is_locked() + WARN_ON() for checking if a specif lock is taken. Instead use the existing annotations which means lockdep_assert_held(). Signed-off-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
committed by
Jonathan Cameron
parent
0a272aaf5f
commit
09ccc1b65c
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/cleanup.h>
|
||||
#include <linux/lockdep.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
@@ -764,7 +765,7 @@ int iio_dma_buffer_enqueue_dmabuf(struct iio_buffer *buffer,
|
||||
bool cookie;
|
||||
int ret;
|
||||
|
||||
WARN_ON(!mutex_is_locked(&queue->lock));
|
||||
lockdep_assert_held(&queue->lock);
|
||||
|
||||
cookie = dma_fence_begin_signalling();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user