summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Crofts <joshua.crofts1@gmail.com>2026-06-14 15:19:10 +0200
committerJonathan Cameron <jic23@kernel.org>2026-06-30 00:15:54 +0100
commitcf12f69291e21d3ca835d9556df246c836bb64d9 (patch)
tree7382b366e0cae5af92fcf29347e942b5013295b4
parenta4e80b835f4a0429649fac128665a218f372b4ab (diff)
downloadlinux-stable-cf12f69291e21d3ca835d9556df246c836bb64d9.tar.gz
linux-stable-cf12f69291e21d3ca835d9556df246c836bb64d9.zip
iio: light: opt3001: add comment to mutex
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. Reviewed-by: Maxwell Doose <m32285159@gmail.com> Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/light/opt3001.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
index 9594c9615dfb..2bce6cd5f4e4 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;