Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: uart: Add comments for lock definitions
@ 2026-08-03  2:18 Noah Techoueyres
  0 siblings, 0 replies; only message in thread
From: Noah Techoueyres @ 2026-08-03  2:18 UTC (permalink / raw)
  To: dtwlin, johan, elder, gregkh; +Cc: greybus-dev, linux-staging, Noah Techoueyres

 Add comments to spinlock and mutex fields explaining what they
 protect, as required by kernel coding style for lock definitions.

Signed-off-by: Noah Techoueyres <noahtechoueyres@gmail.com>
---
 drivers/staging/greybus/uart.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index 7d060b4cd33d..46f38428c5cc 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -50,12 +50,12 @@ struct gb_tty {
 	unsigned int minor;
 	unsigned char clocal;
 	bool disconnected;
-	spinlock_t read_lock;
-	spinlock_t write_lock;
+	spinlock_t read_lock; /* Protects read operations */
+	spinlock_t write_lock; /* Protects write operations */
 	struct async_icount iocount;
 	struct async_icount oldcount;
 	wait_queue_head_t wioctl;
-	struct mutex mutex;
+	struct mutex mutex; /* Protects port configuration */
 	u8 ctrlin;	/* input control lines */
 	u8 ctrlout;	/* output control lines */
 	struct gb_uart_set_line_coding_request line_coding;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-03  2:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03  2:18 [PATCH] staging: greybus: uart: Add comments for lock definitions Noah Techoueyres

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