summaryrefslogtreecommitdiff
path: root/include/linux/iio
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2021-04-26 20:49:05 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-17 15:49:13 +0300
commit6eaf9f6a2738789dedb1e962096f61aaddd81464 (patch)
tree6f2214e61e1a4da67e3abce636b8e76a6d1fc25b /include/linux/iio
parente5333ed09e0f8ece3cbb37912c17cf9880ee3fb0 (diff)
downloadlinux-6eaf9f6a2738789dedb1e962096f61aaddd81464.tar.xz
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')
-rw-r--r--include/linux/iio/iio-opaque.h2
-rw-r--r--include/linux/iio/iio.h3
2 files changed, 2 insertions, 3 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;
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 569861d5887a..9e8e1358a032 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -488,7 +488,6 @@ struct iio_buffer_setup_ops {
/**
* struct iio_dev - industrial I/O device
- * @driver_module: [INTERN] used to make it harder to undercut users
* @modes: [DRIVER] operating modes supported by device
* @currentmode: [DRIVER] current operating mode
* @dev: [DRIVER] device structure, should be assigned a parent
@@ -522,8 +521,6 @@ struct iio_buffer_setup_ops {
* **MUST** be accessed **ONLY** via iio_priv() helper
*/
struct iio_dev {
- struct module *driver_module;
-
int modes;
int currentmode;
struct device dev;