From 6eaf9f6a2738789dedb1e962096f61aaddd81464 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Mon, 26 Apr 2021 18:49:05 +0100 Subject: 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 Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-4-jic23@kernel.org --- include/linux/iio/iio-opaque.h | 2 ++ include/linux/iio/iio.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'include/linux') 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; -- cgit v1.2.3