[PATCH v4 8/8] iio: light: opt3001: add comment to mutex
From: Joshua Crofts via B4 Relay
Date: Mon May 25 2026 - 04:21:17 EST
From: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
Add comment to mutex per checkpatch.pl report. While we're at it, add
a comment to bool ok_to_ignore_lock.
No functional change.
Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
---
drivers/iio/light/opt3001.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
index e35b5cf665e2651e8b6a576aa34fed5082f4ed19..8d89d539b19b862ad7a33cfabd922ddf8b826b2c 100644
--- a/drivers/iio/light/opt3001.c
+++ b/drivers/iio/light/opt3001.c
@@ -103,7 +103,13 @@ struct opt3001_chip_info {
struct opt3001 {
struct i2c_client *client;
+ /*
+ * Ensure data capture and read-modify-write sequences are
+ * not interrupted.
+ */
struct mutex lock;
+
+ /* Allows for IRQs to bypass locking mechanism */
bool ok_to_ignore_lock;
bool result_ready;
wait_queue_head_t result_ready_queue;
--
2.47.3