Thread (6 messages) 6 messages, 2 authors, 28d ago

[PATCH] staging: most: video: add comments to mutex and spinlock definitions

flat view
COLD28d

From: Muhammad Israr <hidden>
Date: 2026-09-10 12:44:31
Also in: lkml
Subsystem: most(r) technology driver, staging subsystem, the rest · Maintainers: Parthiban Veerasooran, Christian Gromm, Greg Kroah-Hartman, Linus Torvalds

Add comments describing what the list_lock spinlock and lock mutex
in struct most_video_dev protect, per checkpatch.pl's
"definition without comment" check.

list_lock protects the pending_mbos list. The mutex is registered
as vdev->lock and is used by the V4L2 core to serialize
video_device ioctl calls; it is not locked directly in this file.

Signed-off-by: Muhammad Israr <redacted>
---
 drivers/staging/most/video/video.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index 3a0445ff62f4..41b617b553aa 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -33,6 +33,7 @@ struct most_video_dev {
 	bool mute;
 
 	struct list_head pending_mbos;
+	/* protects pending_mbos */
 	spinlock_t list_lock;
 
 	struct v4l2_device v4l2_dev;
@@ -40,6 +41,7 @@ struct most_video_dev {
 	struct video_device *vdev;
 	unsigned int ctrl_input;
 
+	/* registered as vdev->lock; serializes video_device ioctls */
 	struct mutex lock;
 
 	wait_queue_head_t wait_data;
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help