diff options
author | Alexandru Ardelean <alexandru.ardelean@analog.com> | 2020-06-30 07:57:08 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-07-07 20:24:07 +0100 |
commit | fa83c3baa539a7ec734c7ee65fad499122f427d7 (patch) | |
tree | cd3af97af709440b17ea93b0a21e0be1cec56f23 /drivers/iio/industrialio-core.c | |
parent | 6a8c6b26f7531a85803380911c7c4a05a639afbe (diff) | |
download | linux-fa83c3baa539a7ec734c7ee65fad499122f427d7.tar.bz2 |
iio: core: move event interface on the opaque struct
Same as with other private fields, this moves the event interface reference
to the opaque IIO device object, to be invisible to drivers.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/industrialio-core.c')
-rw-r--r-- | drivers/iio/industrialio-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index fab5720a7901..ef5e23c33c9d 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -211,7 +211,8 @@ EXPORT_SYMBOL(iio_read_const_attr); int iio_device_set_clock(struct iio_dev *indio_dev, clockid_t clock_id) { int ret; - const struct iio_event_interface *ev_int = indio_dev->event_interface; + struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); + const struct iio_event_interface *ev_int = iio_dev_opaque->event_interface; ret = mutex_lock_interruptible(&indio_dev->mlock); if (ret) @@ -1442,7 +1443,7 @@ static int iio_device_register_sysfs(struct iio_dev *indio_dev) attrcount += ret; } - if (indio_dev->event_interface) + if (iio_dev_opaque->event_interface) clk = &dev_attr_current_timestamp_clock.attr; if (indio_dev->name) |