Re: [PATCH] staging: greybus: camera: add comment for mutex

From: Dan Carpenter

Date: Wed Feb 25 2026 - 06:21:20 EST


On Wed, Feb 25, 2026 at 12:05:06PM +0100, Jose A. Perez de Azpillaga wrote:
> diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
> index 62b55bb28408..a6f3637b8871 100644
> --- a/drivers/staging/greybus/camera.c
> +++ b/drivers/staging/greybus/camera.c
> @@ -53,7 +53,7 @@ struct gb_camera {
> struct gb_connection *data_connection;
> u16 data_cport_id;
>
> - struct mutex mutex;
> + struct mutex mutex; /* Protects camera state */

I'm not sure what it means, and looking at how the mutex is used I
don't feel it's accurate either.

To be honest, I rarely love these lock documentation patches... :/
They're often really vague and sometimes seem like just guessing based
on the name.

regards,
dan carpenter

> enum gb_camera_state state;
>
> struct {