public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: document codec mutex usage
@ 2026-02-19 13:28 Bartłomiej Konecki
  2026-02-19 14:31 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Bartłomiej Konecki @ 2026-02-19 13:28 UTC (permalink / raw)
  To: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, greybus-dev, linux-staging, linux-kernel

Add comments describing lock and register_mutex
in struct gbaudio_codec_info.
The lock protects the codec runtime state and module/DAI lists, while
register_mutex protects hardware registers.
Improve readability and clarify locking semantics.

Signed-off-by: Bartłomiej Konecki <bartekkonecki97@gmail.com>
---
 drivers/staging/greybus/audio_codec.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index f3f7a7ec6be4..90dd3426d4a4 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -70,8 +70,9 @@ struct gbaudio_codec_info {
 	struct list_head module_list;
 	/* to maintain runtime stream params for each DAI */
 	struct list_head dai_list;
-	struct mutex lock;
+	struct mutex lock;	/* protects codec state and module/DAI lists */
 	struct mutex register_mutex;
+	/* serializes access to codec hardware registers*/
 };
 
 struct gbaudio_widget {
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: greybus: document codec mutex usage
  2026-02-19 13:28 [PATCH] staging: greybus: document codec mutex usage Bartłomiej Konecki
@ 2026-02-19 14:31 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-02-19 14:31 UTC (permalink / raw)
  To: Bartłomiej Konecki
  Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, greybus-dev, linux-staging, linux-kernel

On Thu, Feb 19, 2026 at 02:28:19PM +0100, Bartłomiej Konecki wrote:
> Add comments describing lock and register_mutex
> in struct gbaudio_codec_info.
> The lock protects the codec runtime state and module/DAI lists, while
> register_mutex protects hardware registers.
> Improve readability and clarify locking semantics.
> 
> Signed-off-by: Bartłomiej Konecki <bartekkonecki97@gmail.com>
> ---
>  drivers/staging/greybus/audio_codec.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
> index f3f7a7ec6be4..90dd3426d4a4 100644
> --- a/drivers/staging/greybus/audio_codec.h
> +++ b/drivers/staging/greybus/audio_codec.h
> @@ -70,8 +70,9 @@ struct gbaudio_codec_info {
>  	struct list_head module_list;
>  	/* to maintain runtime stream params for each DAI */
>  	struct list_head dai_list;
> -	struct mutex lock;
> +	struct mutex lock;	/* protects codec state and module/DAI lists */
>  	struct mutex register_mutex;
> +	/* serializes access to codec hardware registers*/

No, it doesn't.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-19 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-19 13:28 [PATCH] staging: greybus: document codec mutex usage Bartłomiej Konecki
2026-02-19 14:31 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox