diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-04-26 20:49:08 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-05-17 15:49:13 +0300 |
commit | b804e2b76ac6d5559b99588e0190ac97b5597497 (patch) | |
tree | 96cf8d6f5c0d9fd065e5e5d8654937e8b2c673c6 /include/linux/iio/iio-opaque.h | |
parent | 62f4f36cdfcdbb961bbbeab15e6595dd391d2205 (diff) | |
download | linux-b804e2b76ac6d5559b99588e0190ac97b5597497.tar.xz |
iio: core: move @info_exist_lock to struct iio_dev_opaque
This lock is only of interest to the IIO core, so make it only
visible there.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20210426174911.397061-7-jic23@kernel.org
Diffstat (limited to 'include/linux/iio/iio-opaque.h')
-rw-r--r-- | include/linux/iio/iio-opaque.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/iio/iio-opaque.h b/include/linux/iio/iio-opaque.h index 02038fb2d291..538b4b5ef1a9 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 + * @info_exist_lock: lock to prevent use during removal * @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 @@ -32,6 +33,7 @@ struct iio_dev_opaque { struct iio_dev indio_dev; int id; struct module *driver_module; + struct mutex info_exist_lock; bool trig_readonly; struct iio_event_interface *event_interface; struct iio_buffer **attached_buffers; |