summaryrefslogtreecommitdiff
path: root/include/linux/iio/iio-opaque.h
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2021-04-26 18:49:06 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-17 13:49:13 +0100
commit3028e0c2af95dd476ccd71f4fc025990385168c2 (patch)
treece36199d49c2695d8fa6e459f9316c0f94090d53 /include/linux/iio/iio-opaque.h
parent6eaf9f6a2738789dedb1e962096f61aaddd81464 (diff)
iio: core: move @trig_readonly from struct iio_dev to struct iio_dev_opaque
This is only set via the iio_trig_set_immutable() call and later used by the IIO core so there is no benefit in drivers being able to access it. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20210426174911.397061-5-jic23@kernel.org
Diffstat (limited to 'include/linux/iio/iio-opaque.h')
-rw-r--r--include/linux/iio/iio-opaque.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/iio/iio-opaque.h b/include/linux/iio/iio-opaque.h
index 96dd265103d0..10aa97239117 100644
--- a/include/linux/iio/iio-opaque.h
+++ b/include/linux/iio/iio-opaque.h
@@ -8,6 +8,7 @@
* @indio_dev: public industrial I/O device information
* @id: used to identify device internally
* @driver_module: used to make it harder to undercut users
+ * @trig_readonly: mark the current trigger immutable
* @event_interface: event chrdevs associated with interrupt lines
* @attached_buffers: array of buffers statically attached by the driver
* @attached_buffers_cnt: number of buffers in the array of statically attached buffers
@@ -30,6 +31,7 @@ struct iio_dev_opaque {
struct iio_dev indio_dev;
int id;
struct module *driver_module;
+ bool trig_readonly;
struct iio_event_interface *event_interface;
struct iio_buffer **attached_buffers;
unsigned int attached_buffers_cnt;