[PATCH v3 2/2] staging: most: video: Document locks in struct most_video_dev

From: Shivani Patel

Date: Tue Nov 17 2026 - 12:07:35 EST


checkpatch.pl reports that list_lock and lock in struct most_video_dev
are defined without a comment.

list_lock protects pending_mbos and mute across all callers. lock is
assigned to vdev->lock and is used by the V4L2 core to serialize ioctls.

Add short comments describing what each lock protects.

Signed-off-by: Shivani Patel <patelshivani2283@xxxxxxxxx>
---
v3:
- Reword list_lock comment to "Protects @pending_mbos and @mute" instead of
singling out the rx completion path (Dan Carpenter)
- Split out locking fixes into patch 1/2

v2:
- Add a commit message and Signed-off-by (Andy Shevchenko)
- Use the "staging: most: video:" subject prefix
- Make the comments shorter and accurate
- Drop the outreachy list (Julia Lawall)

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 92d5fbc9a..02a44659a 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 and @mute */
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;

+ /* Serializes V4L2 ioctls, used as the video_device lock */
struct mutex lock;

wait_queue_head_t wait_data;
--
2.50.1 (Apple Git-155)