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:05 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-17 13:49:13 +0100
commit6eaf9f6a2738789dedb1e962096f61aaddd81464 (patch)
tree6f2214e61e1a4da67e3abce636b8e76a6d1fc25b /include/linux/iio/iio-opaque.h
parente5333ed09e0f8ece3cbb37912c17cf9880ee3fb0 (diff)
iio: core: move @driver_module from struct iio_dev to struct iio_dev_opaque
Continuing move to hide internal elements from drivers, move this structure element over. It's only accessed from iio core files so this one was straight forward and no accessor functions are needed. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20210426174911.397061-4-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 f876e3aede2c..96dd265103d0 100644
--- a/include/linux/iio/iio-opaque.h
+++ b/include/linux/iio/iio-opaque.h
@@ -7,6 +7,7 @@
* struct iio_dev_opaque - industrial I/O device opaque information
* @indio_dev: public industrial I/O device information
* @id: used to identify device internally
+ * @driver_module: used to make it harder to undercut users
* @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
@@ -28,6 +29,7 @@
struct iio_dev_opaque {
struct iio_dev indio_dev;
int id;
+ struct module *driver_module;
struct iio_event_interface *event_interface;
struct iio_buffer **attached_buffers;
unsigned int attached_buffers_cnt;