diff mbox series

v4l2: async: remove locking when initializing async notifier

Message ID 20181130021107.32264-1-niklas.soderlund+renesas@ragnatech.se
State Mainlined
Delegated to: Kieran Bingham
Headers show
Series v4l2: async: remove locking when initializing async notifier | expand

Commit Message

Niklas Söderlund Nov. 30, 2018, 2:11 a.m. UTC
There is no need to hold the list_lock when initializing the local
asd_list of a notifier. Remove the lock handling to simplify the code
and remove a potential LOCKDEP warning.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reported-by: Jacopo Mondi <jacopo@jmondi.org>
---
 drivers/media/v4l2-core/v4l2-async.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index a6d91370838d9342..15b0c44a76e7f6c3 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -424,11 +424,7 @@  static int v4l2_async_notifier_asd_valid(struct v4l2_async_notifier *notifier,
 
 void v4l2_async_notifier_init(struct v4l2_async_notifier *notifier)
 {
-	mutex_lock(&list_lock);
-
 	INIT_LIST_HEAD(&notifier->asd_list);
-
-	mutex_unlock(&list_lock);
 }
 EXPORT_SYMBOL(v4l2_async_notifier_init);