Skip to contentSkip to conversation

iio: Fix documentation for iio_dev mlock

PATCH Applied Daniel Baluta 2 participants 2 messages Feb 8, 2016 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: Fix documentation for iio_dev mlock

mlock *must* be used by core and drivers to protect access to devices state changes.

---
At a first glance there are few places where access to iio_dev state changes are done without mlock protection. Will fix them with follow up patches.

 include/linux/iio/iio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/iio/iio.h +1 -1
index b589411..ce9e9c1 100644
@@ -448,7 +448,7 @@ struct iio_buffer_setup_ops {
  * @buffer:		[DRIVER] any buffer present
  * @buffer_list:	[INTERN] list of all buffers currently attached
  * @scan_bytes:		[INTERN] num bytes captured to be fed to buffer demux
- * @mlock:		[INTERN] lock used to prevent simultaneous device state
+ * @mlock:		[DRIVER] lock used to prevent simultaneous device state
  *			changes
  * @available_scan_masks: [DRIVER] optional array of allowed bitmasks
  * @masklength:		[INTERN] the length of the mask established from
Signature · 1 line
2.5.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Daniel Baluta

mlock *must* be used by core and drivers to protect access to devices state changes.

Applied. Thanks for cleaning this up.

Jonathan

Quoted 22 lines

---
At a first glance there are few places where access to iio_dev state changes are done without mlock protection. Will fix them with follow up patches.

 include/linux/iio/iio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/iio/iio.h +1 -1
index b589411..ce9e9c1 100644
@@ -448,7 +448,7 @@ struct iio_buffer_setup_ops {
  * @buffer:		[DRIVER] any buffer present
  * @buffer_list:	[INTERN] list of all buffers currently attached
  * @scan_bytes:		[INTERN] num bytes captured to be fed to buffer demux
- * @mlock:		[INTERN] lock used to prevent simultaneous device state
+ * @mlock:		[DRIVER] lock used to prevent simultaneous device state
  *			changes
  * @available_scan_masks: [DRIVER] optional array of allowed bitmasks
  * @masklength:		[INTERN] the length of the mask established from